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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service.h

Issue 294893005: [SyncFS] Make GetOriginStatusMap asynchronous (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work for nits Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SYNC_FILE_SYSTEM_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // KeyedService overrides. 53 // KeyedService overrides.
54 virtual void Shutdown() OVERRIDE; 54 virtual void Shutdown() OVERRIDE;
55 55
56 void InitializeForApp( 56 void InitializeForApp(
57 fileapi::FileSystemContext* file_system_context, 57 fileapi::FileSystemContext* file_system_context,
58 const GURL& app_origin, 58 const GURL& app_origin,
59 const SyncStatusCallback& callback); 59 const SyncStatusCallback& callback);
60 60
61 SyncServiceState GetSyncServiceState(); 61 SyncServiceState GetSyncServiceState();
62 void GetExtensionStatusMap(std::map<GURL, std::string>* status_map); 62 void GetExtensionStatusMap(
63 const RemoteFileSyncService::StatusMapCallback& callback);
63 void DumpFiles(const GURL& origin, const DumpFilesCallback& callback); 64 void DumpFiles(const GURL& origin, const DumpFilesCallback& callback);
64 void DumpDatabase(const DumpFilesCallback& callback); 65 void DumpDatabase(const DumpFilesCallback& callback);
65 66
66 // Returns the file |url|'s sync status. 67 // Returns the file |url|'s sync status.
67 void GetFileSyncStatus( 68 void GetFileSyncStatus(
68 const fileapi::FileSystemURL& url, 69 const fileapi::FileSystemURL& url,
69 const SyncFileStatusCallback& callback); 70 const SyncFileStatusCallback& callback);
70 71
71 void AddSyncEventObserver(SyncEventObserver* observer); 72 void AddSyncEventObserver(SyncEventObserver* observer);
72 void RemoveSyncEventObserver(SyncEventObserver* observer); 73 void RemoveSyncEventObserver(SyncEventObserver* observer);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void DidDumpFiles(const GURL& app_origin, 107 void DidDumpFiles(const GURL& app_origin,
107 const DumpFilesCallback& callback, 108 const DumpFilesCallback& callback,
108 scoped_ptr<base::ListValue> files); 109 scoped_ptr<base::ListValue> files);
109 110
110 void DidDumpDatabase(const DumpFilesCallback& callback, 111 void DidDumpDatabase(const DumpFilesCallback& callback,
111 scoped_ptr<base::ListValue> list); 112 scoped_ptr<base::ListValue> list);
112 void DidDumpV2Database(const DumpFilesCallback& callback, 113 void DidDumpV2Database(const DumpFilesCallback& callback,
113 scoped_ptr<base::ListValue> v1list, 114 scoped_ptr<base::ListValue> v1list,
114 scoped_ptr<base::ListValue> v2list); 115 scoped_ptr<base::ListValue> v2list);
115 116
117 void DidGetExtensionStatusMap(
118 const RemoteFileSyncService::StatusMapCallback& callback,
119 const RemoteFileSyncService::OriginStatusMap& status_map);
120 void DidGetV2ExtensionStatusMap(
121 const RemoteFileSyncService::StatusMapCallback& callback,
122 const RemoteFileSyncService::OriginStatusMap& status_map_v1,
123 const RemoteFileSyncService::OriginStatusMap& status_map_v2);
124
116 // Overrides sync_enabled_ setting. This should be called only by tests. 125 // Overrides sync_enabled_ setting. This should be called only by tests.
117 void SetSyncEnabledForTesting(bool enabled); 126 void SetSyncEnabledForTesting(bool enabled);
118 127
119 void DidGetLocalChangeStatus(const SyncFileStatusCallback& callback, 128 void DidGetLocalChangeStatus(const SyncFileStatusCallback& callback,
120 SyncStatusCode status, 129 SyncStatusCode status,
121 bool has_pending_local_changes); 130 bool has_pending_local_changes);
122 131
123 void OnRemoteServiceStateUpdated(RemoteServiceState state, 132 void OnRemoteServiceStateUpdated(RemoteServiceState state,
124 const std::string& description); 133 const std::string& description);
125 134
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 bool sync_enabled_; 187 bool sync_enabled_;
179 188
180 ObserverList<SyncEventObserver> observers_; 189 ObserverList<SyncEventObserver> observers_;
181 190
182 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); 191 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService);
183 }; 192 };
184 193
185 } // namespace sync_file_system 194 } // namespace sync_file_system
186 195
187 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ 196 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698