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

Side by Side Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.h

Issue 24106002: Add SNAPSHOT sync mode to LocalFileSyncContext::PrepareForSync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/local/canned_syncable_file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 namespace net { 38 namespace net {
39 class URLRequestContext; 39 class URLRequestContext;
40 } 40 }
41 41
42 namespace quota { 42 namespace quota {
43 class QuotaManager; 43 class QuotaManager;
44 } 44 }
45 45
46 namespace sync_file_system { 46 namespace sync_file_system {
47 47
48 class FileChangeList;
48 class LocalFileSyncContext; 49 class LocalFileSyncContext;
49 class SyncFileSystemBackend; 50 class SyncFileSystemBackend;
50 51
51 // A canned syncable filesystem for testing. 52 // A canned syncable filesystem for testing.
52 // This internally creates its own QuotaManager and FileSystemContext 53 // This internally creates its own QuotaManager and FileSystemContext
53 // (as we do so for each isolated application). 54 // (as we do so for each isolated application).
54 class CannedSyncableFileSystem 55 class CannedSyncableFileSystem
55 : public LocalFileSyncStatus::Observer { 56 : public LocalFileSyncStatus::Observer {
56 public: 57 public:
57 typedef base::Callback<void(base::PlatformFileError)> StatusCallback; 58 typedef base::Callback<void(base::PlatformFileError)> StatusCallback;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 134
134 // Purges the file system local storage. 135 // Purges the file system local storage.
135 base::PlatformFileError DeleteFileSystem(); 136 base::PlatformFileError DeleteFileSystem();
136 137
137 // Retrieves the quota and usage. 138 // Retrieves the quota and usage.
138 quota::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota); 139 quota::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota);
139 140
140 // ChangeTracker related methods. They run on file task runner. 141 // ChangeTracker related methods. They run on file task runner.
141 void GetChangedURLsInTracker(fileapi::FileSystemURLSet* urls); 142 void GetChangedURLsInTracker(fileapi::FileSystemURLSet* urls);
142 void ClearChangeForURLInTracker(const fileapi::FileSystemURL& url); 143 void ClearChangeForURLInTracker(const fileapi::FileSystemURL& url);
144 void GetChangesForURLInTracker(const fileapi::FileSystemURL& url,
145 FileChangeList* changes);
143 146
144 SyncFileSystemBackend* backend(); 147 SyncFileSystemBackend* backend();
145 fileapi::FileSystemOperationRunner* operation_runner(); 148 fileapi::FileSystemOperationRunner* operation_runner();
146 149
147 // LocalFileSyncStatus::Observer overrides. 150 // LocalFileSyncStatus::Observer overrides.
148 virtual void OnSyncEnabled(const fileapi::FileSystemURL& url) OVERRIDE; 151 virtual void OnSyncEnabled(const fileapi::FileSystemURL& url) OVERRIDE;
149 virtual void OnWriteEnabled(const fileapi::FileSystemURL& url) OVERRIDE; 152 virtual void OnWriteEnabled(const fileapi::FileSystemURL& url) OVERRIDE;
150 153
151 // Operation methods body. 154 // Operation methods body.
152 // They can be also called directly if the caller is already on IO thread. 155 // They can be also called directly if the caller is already on IO thread.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 bool is_filesystem_opened_; 228 bool is_filesystem_opened_;
226 229
227 scoped_refptr<ObserverList> sync_status_observers_; 230 scoped_refptr<ObserverList> sync_status_observers_;
228 231
229 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); 232 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem);
230 }; 233 };
231 234
232 } // namespace sync_file_system 235 } // namespace sync_file_system
233 236
234 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 237 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/local/canned_syncable_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698