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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 897793002: Remove gcm channel state supported by sync service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android builds Created 5 years, 10 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/services/gcm/gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc
index fba052a0dd540801aa84cb107cd550a7f9168dda..df86051bc60ecc2ab86f826ef97766e814a681a2 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
#include "components/gcm_driver/gcm_driver.h"
#include "components/pref_registry/pref_registry_syncable.h"
@@ -26,6 +25,7 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/common/chrome_constants.h"
+#include "components/gcm_driver/gcm_channel_status_syncer.h"
#include "components/gcm_driver/gcm_client_factory.h"
#include "components/gcm_driver/gcm_driver_desktop.h"
#include "components/signin/core/browser/signin_manager.h"
@@ -120,16 +120,16 @@ void GCMProfileService::IdentityObserver::StartAccountTracker() {
// static
bool GCMProfileService::IsGCMEnabled(Profile* profile) {
- return profile->GetPrefs()->GetBoolean(prefs::kGCMChannelEnabled);
+#if defined(OS_ANDROID)
+ return true;
+#else
+ return profile->GetPrefs()->GetBoolean(gcm::prefs::kGCMChannelStatus);
+#endif // defined(OS_ANDROID)
}
// static
void GCMProfileService::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
- registry->RegisterBooleanPref(
- prefs::kGCMChannelEnabled,
- true,
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
PushMessagingServiceImpl::RegisterProfilePrefs(registry);
}
« no previous file with comments | « chrome/browser/invalidation/ticl_profile_settings_provider_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698