class FileSystemURL;
}
+namespace leveldb {
+class Env;
+class WriteBatch;
+}
+
namespace sync_file_system {
// Tracks local file changes for cloud-backed file systems.
// (So that we can make sure DB operations are done before actual update
// happens)
LocalFileChangeTracker(const base::FilePath& base_path,
+ leveldb::Env* env_override,
base::SequencedTaskRunner* file_task_runner);
virtual ~LocalFileChangeTracker();
// called.
void DemoteChangesForURL(const fileapi::FileSystemURL& url);
+ // Promotes demoted changes for |url| to the normal queue.
+ void PromoteDemotedChangesForURL(const fileapi::FileSystemURL& url);
+
// Promotes all demoted changes to the normal queue. Returns true if it has
// promoted any changes.
bool PromoteDemotedChanges();
FileChangeMap* changes,
ChangeSeqMap* change_seqs);
+ void ResetForURL(const fileapi::FileSystemURL& url,
+ int change_seq,
+ leveldb::WriteBatch* batch);
+
bool initialized_;
scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
// Change sequence number. Briefly gives a hint about the order of changes,
// but they are updated when a new change comes on the same file (as
// well as Drive's changestamps).
- int64 current_change_seq_;
+ int64 current_change_seq_number_;
// This can be accessed on any threads (with num_changes_lock_).
int64 num_changes_;