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

Unified Diff: chrome/browser/apps/drive/drive_app_provider.cc

Issue 695753003: app_list: Decouple UpdateDriveApp from sync processing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test attempt 2 Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/apps/drive/drive_app_provider_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | chrome/browser/apps/drive/drive_app_provider_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698