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

Unified Diff: chrome/browser/invalidation/ticl_invalidation_service.cc

Issue 208263019: Small changes around GCMNetworkChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/invalidation/ticl_invalidation_service.cc
diff --git a/chrome/browser/invalidation/ticl_invalidation_service.cc b/chrome/browser/invalidation/ticl_invalidation_service.cc
index 28c9c9d0dd49b0e7e41723ffaa25279567a39f7f..58ea840dc6a8aa982180377917a7b7a7db4bd231 100644
--- a/chrome/browser/invalidation/ticl_invalidation_service.cc
+++ b/chrome/browser/invalidation/ticl_invalidation_service.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/services/gcm/gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/common/chrome_content_client.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/signin/core/profile_oauth2_token_service.h"
#include "google_apis/gaia/gaia_constants.h"
@@ -430,10 +431,12 @@ void TiclInvalidationService::UpdateInvalidationNetworkChannel() {
InvalidationNetworkChannel network_channel_type = PUSH_CLIENT_CHANNEL;
// For now don't use GCM on iOS.
#if !defined(OS_IOS)
- if (profile_->GetPrefs()->GetBoolean(
- prefs::kInvalidationServiceUseGCMChannel) &&
- gcm::GCMProfileService::GetGCMEnabledState(profile_) ==
- gcm::GCMProfileService::ALWAYS_ENABLED) {
+ if (gcm::GCMProfileService::GetGCMEnabledState(profile_) ==
+ gcm::GCMProfileService::ALWAYS_ENABLED &&
+ (profile_->GetPrefs()->GetBoolean(
+ prefs::kInvalidationServiceUseGCMChannel) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kInvalidationUseGCMChannel))) {
network_channel_type = GCM_NETWORK_CHANNEL;
}
#endif
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698