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

Unified Diff: chrome/browser/chromeos/drive/drive_integration_service.cc

Issue 20029004: Initial call for DriveAppRegistry::Update should wait for notification start-up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_integration_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc
index 6ae980a22ea5ebf49c4a1d08c8cc8bf4e4abfd31..1af4edc9e01ddd613deb027c6cc31d29ab91e719 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -252,6 +252,9 @@ void DriveIntegrationService::OnNotificationReceived() {
}
void DriveIntegrationService::OnPushNotificationEnabled(bool enabled) {
+ if (enabled)
+ drive_app_registry_->Update();
+
const char* status = (enabled ? "enabled" : "disabled");
util::Log("Push notification is %s", status);
}
@@ -368,9 +371,11 @@ void DriveIntegrationService::InitializeAfterMetadataInitialized(
drive_notification_manager->push_notification_registered();
const char* status = (registered ? "registered" : "not registered");
util::Log("Push notification is %s", status);
+
+ if (drive_notification_manager->push_notification_enabled())
+ drive_app_registry_->Update();
}
- drive_app_registry_->Update();
AddDriveMountPoint();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698