| Index: chrome/browser/sync_file_system/local/local_file_change_tracker.h
|
| diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker.h b/chrome/browser/sync_file_system/local/local_file_change_tracker.h
|
| index 916c9b21c988265268f2cbf9158abf4a48581fa3..93470d14eec41adf47a8d5ea1d62e5a395047ebb 100644
|
| --- a/chrome/browser/sync_file_system/local/local_file_change_tracker.h
|
| +++ b/chrome/browser/sync_file_system/local/local_file_change_tracker.h
|
| @@ -75,6 +75,17 @@ class LocalFileChangeTracker
|
| // Clears the pending changes recorded in this tracker for |url|.
|
| void ClearChangesForURL(const fileapi::FileSystemURL& url);
|
|
|
| + // Creates a fresh (empty) in-memory record for |url|.
|
| + // Note that new changes are recorded to the mirror too.
|
| + void CreateFreshMirrorForURL(const fileapi::FileSystemURL& url);
|
| +
|
| + // Removes a mirror for |url|, and commits the change status to database.
|
| + void RemoveMirrorAndCommitChangesForURL(const fileapi::FileSystemURL& url);
|
| +
|
| + // Resets the changes to the ones recorded in mirror for |url|, and
|
| + // commits the updated change status to database.
|
| + void ResetToMirrorAndCommitChangesForURL(const fileapi::FileSystemURL& url);
|
| +
|
| // Called by FileSyncService at the startup time to restore last dirty changes
|
| // left after the last shutdown (if any).
|
| SyncStatusCode Initialize(fileapi::FileSystemContext* file_system_context);
|
| @@ -123,6 +134,12 @@ class LocalFileChangeTracker
|
| void RecordChange(const fileapi::FileSystemURL& url,
|
| const FileChange& change);
|
|
|
| + static void RecordChangeToChangeMaps(const fileapi::FileSystemURL& url,
|
| + const FileChange& change,
|
| + int change_seq,
|
| + FileChangeMap* changes,
|
| + ChangeSeqMap* change_seqs);
|
| +
|
| bool initialized_;
|
|
|
| scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
|
| @@ -130,6 +147,9 @@ class LocalFileChangeTracker
|
| FileChangeMap changes_;
|
| ChangeSeqMap change_seqs_;
|
|
|
| + // For mirrors.
|
| + FileChangeMap mirror_changes_;
|
| +
|
| scoped_ptr<TrackerDB> tracker_db_;
|
|
|
| // Change sequence number. Briefly gives a hint about the order of changes,
|
|
|