| 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 73876cff8040d88f58724eb6e28b1201ead996a5..f0e65717570107889d237db7fc8f977927e98b2f 100644
|
| --- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
|
| +++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
|
| @@ -578,14 +578,20 @@ void SyncEngine::SetSyncEnabled(bool sync_enabled) {
|
| sync_enabled));
|
| }
|
|
|
| -void SyncEngine::PromoteDemotedChanges() {
|
| - if (!sync_worker_)
|
| +void SyncEngine::PromoteDemotedChanges(const base::Closure& callback) {
|
| + if (!sync_worker_) {
|
| + callback.Run();
|
| return;
|
| + }
|
| +
|
| + base::Closure relayed_callback = RelayCallbackToCurrentThread(
|
| + FROM_HERE, callback_tracker_.Register(callback, callback));
|
|
|
| worker_task_runner_->PostTask(
|
| FROM_HERE,
|
| base::Bind(&SyncWorkerInterface::PromoteDemotedChanges,
|
| - base::Unretained(sync_worker_.get())));
|
| + base::Unretained(sync_worker_.get()),
|
| + relayed_callback));
|
| }
|
|
|
| void SyncEngine::ApplyLocalChange(
|
|
|