| Index: chrome/browser/apps/drive/drive_app_provider.cc
|
| diff --git a/chrome/browser/apps/drive/drive_app_provider.cc b/chrome/browser/apps/drive/drive_app_provider.cc
|
| index e55b6d6029fa2f07d9dad4444acc13fd001eef38..6e2c340ea67437402ccf18bba69f04313f784e93 100644
|
| --- a/chrome/browser/apps/drive/drive_app_provider.cc
|
| +++ b/chrome/browser/apps/drive/drive_app_provider.cc
|
| @@ -69,13 +69,27 @@ void DriveAppProvider::SetDriveServiceBridgeForTest(
|
| void DriveAppProvider::AddUninstalledDriveAppFromSync(
|
| const std::string& drive_app_id) {
|
| mapping_->AddUninstalledDriveApp(drive_app_id);
|
| - UpdateDriveApps();
|
| +
|
| + // Decouple the operation because this function could be called during
|
| + // sync processing and UpdateDriveApps could trigger another sync change.
|
| + // See http://crbug.com/429205
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&DriveAppProvider::UpdateDriveApps,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| void DriveAppProvider::RemoveUninstalledDriveAppFromSync(
|
| const std::string& drive_app_id) {
|
| mapping_->RemoveUninstalledDriveApp(drive_app_id);
|
| - UpdateDriveApps();
|
| +
|
| + // Decouple the operation because this function could be called during
|
| + // sync processing and UpdateDriveApps could trigger another sync change.
|
| + // See http://crbug.com/429205
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&DriveAppProvider::UpdateDriveApps,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| void DriveAppProvider::UpdateMappingAndExtensionSystem(
|
|
|