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

Unified Diff: chrome/browser/invalidation/ticl_profile_settings_provider_unittest.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/invalidation/ticl_profile_settings_provider_unittest.cc
diff --git a/chrome/browser/invalidation/ticl_profile_settings_provider_unittest.cc b/chrome/browser/invalidation/ticl_profile_settings_provider_unittest.cc
index dc9b0edfbc5287611baa6d15ea8c75e63b2c5db3..7d62b4cdc0825f6b2773f2f99033478eded99cc5 100644
--- a/chrome/browser/invalidation/ticl_profile_settings_provider_unittest.cc
+++ b/chrome/browser/invalidation/ticl_profile_settings_provider_unittest.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/gcm_driver/gcm_channel_status_syncer.h"
#include "components/invalidation/fake_invalidation_state_tracker.h"
#include "components/invalidation/invalidation_state_tracker.h"
#include "components/invalidation/ticl_invalidation_service.h"
@@ -79,26 +80,26 @@ TEST_F(TiclProfileSettingsProviderTest, ChannelSelectionTest) {
// If GCM is enabled and invalidation channel setting is not set or set to
// true then use GCM channel.
- prefs->SetBoolean(prefs::kGCMChannelEnabled, true);
+ prefs->SetBoolean(gcm::prefs::kGCMChannelStatus, true);
prefs->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, true);
EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel());
- prefs->SetBoolean(prefs::kGCMChannelEnabled, true);
+ prefs->SetBoolean(gcm::prefs::kGCMChannelStatus, true);
prefs->ClearPref(prefs::kInvalidationServiceUseGCMChannel);
EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel());
- prefs->ClearPref(prefs::kGCMChannelEnabled);
+ prefs->ClearPref(gcm::prefs::kGCMChannelStatus);
prefs->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, true);
EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel());
// If invalidation channel setting is set to false, fall back to push channel.
- prefs->SetBoolean(prefs::kGCMChannelEnabled, true);
+ prefs->SetBoolean(gcm::prefs::kGCMChannelStatus, true);
prefs->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, false);
EXPECT_EQ(TiclInvalidationService::PUSH_CLIENT_CHANNEL, GetNetworkChannel());
// If invalidation channel setting says use GCM but GCM is not enabled, fall
// back to push channel.
- prefs->SetBoolean(prefs::kGCMChannelEnabled, false);
+ prefs->SetBoolean(gcm::prefs::kGCMChannelStatus, false);
prefs->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, true);
EXPECT_EQ(TiclInvalidationService::PUSH_CLIENT_CHANNEL, GetNetworkChannel());
}
« no previous file with comments | « chrome/browser/invalidation/ticl_profile_settings_provider.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698