Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync_file_system / local / local_file_change_tracker.h
index b3379e3..104e1e5 100644 (file)
@@ -29,6 +29,11 @@ class FileSystemContext;
 class FileSystemURL;
 }
 
+namespace leveldb {
+class Env;
+class WriteBatch;
+}
+
 namespace sync_file_system {
 
 // Tracks local file changes for cloud-backed file systems.
@@ -42,6 +47,7 @@ class LocalFileChangeTracker
   // (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();
 
@@ -92,6 +98,9 @@ class 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();
@@ -156,6 +165,10 @@ class LocalFileChangeTracker
                                        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_;
@@ -171,7 +184,7 @@ class LocalFileChangeTracker
   // 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_;