Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: webkit/fileapi/syncable/local_file_change_tracker.h

Issue 10966003: Add LocalFileChangeTracker database to record non-synced dirty files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Normalize expected file path Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/fileapi/syncable/local_file_change_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/syncable/local_file_change_tracker.h
diff --git a/webkit/fileapi/syncable/local_file_change_tracker.h b/webkit/fileapi/syncable/local_file_change_tracker.h
index 14e1bf2f2d77c8a4c76c75d80ed1cb178b7a42d8..d04c4d1bd58412cb9ea4ce0041d4fae61ab5d2ed 100644
--- a/webkit/fileapi/syncable/local_file_change_tracker.h
+++ b/webkit/fileapi/syncable/local_file_change_tracker.h
@@ -6,6 +6,7 @@
#define WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_CHANGE_TRACKER_H_
#include <map>
+#include <string>
#include <vector>
#include "base/basictypes.h"
@@ -41,6 +42,7 @@ class FILEAPI_EXPORT LocalFileChangeTracker
// (So that we can make sure DB operations are done before actual update
// happens)
LocalFileChangeTracker(LocalFileSyncStatus* sync_status,
+ const FilePath& profile_path,
base::SequencedTaskRunner* file_task_runner);
virtual ~LocalFileChangeTracker();
@@ -75,12 +77,19 @@ class FILEAPI_EXPORT LocalFileChangeTracker
void CollectLastDirtyChanges(FileChangeMap* changes);
private:
+ class TrackerDB;
+ friend class LocalFileChangeTrackerTest;
+
void RecordChange(const FileSystemURL& url, const FileChange& change);
// Database related methods.
void MarkDirtyOnDatabase(const FileSystemURL& url);
void ClearDirtyOnDatabase(const FileSystemURL& url);
+ std::string SerializeExternalFileSystemURL(const FileSystemURL& url);
+ bool DeserializeExternalFileSystemURL(
+ const std::string& serialized_url, FileSystemURL* url);
+
// Not owned; this must have the same lifetime with us (both owned
// by FileSystemContext).
LocalFileSyncStatus *sync_status_;
@@ -89,6 +98,8 @@ class FILEAPI_EXPORT LocalFileChangeTracker
FileChangeMap changes_;
+ scoped_ptr<TrackerDB> tracker_db_;
+
DISALLOW_COPY_AND_ASSIGN(LocalFileChangeTracker);
};
« no previous file with comments | « no previous file | webkit/fileapi/syncable/local_file_change_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698