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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 268413002: [SyncFS] Make DumpFiles async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work for a nit 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/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 82a03c753eac88eef7a8134e0945c31b5b5b0d86..124bfd495e2648bbffac64d4269956ec6deba672 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -301,9 +301,15 @@ void SyncEngine::GetOriginStatusMap(OriginStatusMap* status_map) {
sync_worker_->GetOriginStatusMap(status_map);
}
-scoped_ptr<base::ListValue> SyncEngine::DumpFiles(const GURL& origin) {
- // TODO(peria): Make this route asynchronous.
- return sync_worker_->DumpFiles(origin);
+void SyncEngine::DumpFiles(const GURL& origin,
+ const ListCallback& callback) {
+ PostTaskAndReplyWithResult(
+ worker_task_runner_,
+ FROM_HERE,
+ base::Bind(&SyncWorker::DumpFiles,
+ base::Unretained(sync_worker_.get()),
+ origin),
+ callback);
}
scoped_ptr<base::ListValue> SyncEngine::DumpDatabase() {

Powered by Google App Engine
This is Rietveld 408576698