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

Unified Diff: chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc

Issue 294893005: [SyncFS] Make GetOriginStatusMap asynchronous (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc
index c868a99bcbfbf686c8749688823551602183366f..4773f3e787fd5458ccd494fabc1eae6b4c10d70b 100644
--- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service.cc
@@ -201,8 +201,9 @@ RemoteServiceState DriveFileSyncService::GetCurrentState() const {
return state_;
}
-void DriveFileSyncService::GetOriginStatusMap(OriginStatusMap* status_map) {
- DCHECK(status_map);
+void DriveFileSyncService::GetOriginStatusMap(
+ const StatusMapCallback& callback) {
+ scoped_ptr<OriginStatusMap> status_map(new OriginStatusMap);
// Add batch sync origins held by DriveFileSyncService.
typedef std::map<GURL, std::string>::const_iterator iterator;
@@ -221,6 +222,8 @@ void DriveFileSyncService::GetOriginStatusMap(OriginStatusMap* status_map) {
itr != metadata_store_->disabled_origins().end();
++itr)
(*status_map)[itr->first] = "Disabled";
+
+ callback.Run(status_map.Pass());
}
void DriveFileSyncService::DumpFiles(const GURL& origin,

Powered by Google App Engine
This is Rietveld 408576698