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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 286213003: Make GCMProfileService own GCMDriver, instead of deriving from it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync 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/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 627a732ba9bdc101375f08eaaba1042019408481..58e87f3d8f0799275a39f41516df152af12bcda7 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -30,6 +30,7 @@
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/services/gcm/gcm_driver.h"
#include "chrome/browser/services/gcm/gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/browser/signin/about_signin_internals_factory.h"
@@ -1023,11 +1024,11 @@ void ProfileSyncService::OnExperimentsChanged(
syncer::Experiments::ENABLED);
gcm::GCMProfileService* gcm_profile_service =
gcm::GCMProfileServiceFactory::GetForProfile(profile());
- if (gcm_profile_service) {
+ if (gcm_profile_service && gcm_profile_service->driver()) {
if (experiments.gcm_channel_state == syncer::Experiments::SUPPRESSED)
- gcm_profile_service->Stop();
+ gcm_profile_service->driver()->Disable();
else
- gcm_profile_service->Start();
+ gcm_profile_service->driver()->Enable();
}
} else {
profile()->GetPrefs()->ClearPref(prefs::kGCMChannelEnabled);
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service_unittest.cc ('k') | chrome/browser/ui/webui/gcm_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698