Commit a054e7a1 authored by zea@chromium.org's avatar zea@chromium.org

[GCM] Cleanup for ios enabling

BUG=342317

Review URL: https://codereview.chromium.org/211973003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260313 0039d316-1c4b-4281-b951-d872f2087c98
parent 02523dab
......@@ -362,7 +362,7 @@
'chromium_swarm_tests',
],
}],
['OS!="android" and OS!="ios"', {
['OS!="android"', {
'dependencies': [
'../google_apis/gcm/gcm.gyp:gcm_unit_tests',
],
......
......@@ -431,8 +431,6 @@ void TiclInvalidationService::StartInvalidator(
void TiclInvalidationService::UpdateInvalidationNetworkChannel() {
InvalidationNetworkChannel network_channel_type = PUSH_CLIENT_CHANNEL;
// For now don't use GCM on iOS.
#if !defined(OS_IOS)
if (gcm::GCMProfileService::GetGCMEnabledState(profile_) ==
gcm::GCMProfileService::ALWAYS_ENABLED &&
(profile_->GetPrefs()->GetBoolean(
......@@ -441,7 +439,6 @@ void TiclInvalidationService::UpdateInvalidationNetworkChannel() {
switches::kInvalidationUseGCMChannel))) {
network_channel_type = GCM_NETWORK_CHANNEL;
}
#endif
if (network_channel_type_ == network_channel_type)
return;
network_channel_type_ = network_channel_type;
......
......@@ -108,19 +108,13 @@ class TiclInvalidationServiceChannelTest : public ::testing::Test {
};
TEST_F(TiclInvalidationServiceChannelTest, ChannelSelectionTest) {
TiclInvalidationService::InvalidationNetworkChannel expected_gcm_channel =
TiclInvalidationService::GCM_NETWORK_CHANNEL;
#if defined(OS_IOS)
expected_gcm_channel = TiclInvalidationService::PUSH_CLIENT_CHANNEL;
#endif
EXPECT_EQ(TiclInvalidationService::PUSH_CLIENT_CHANNEL, GetNetworkChannel());
// If stars allign use GCM channel.
profile_->GetPrefs()->SetBoolean(prefs::kGCMChannelEnabled, true);
profile_->GetPrefs()->SetBoolean(prefs::kInvalidationServiceUseGCMChannel,
true);
EXPECT_EQ(expected_gcm_channel, GetNetworkChannel());
EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel());
// If Invalidation channel setting is not set or says false fall back to push
// channel.
......@@ -149,7 +143,7 @@ TEST_F(TiclInvalidationServiceChannelTest, ChannelSelectionTest) {
profile_->GetPrefs()->SetBoolean(prefs::kInvalidationServiceUseGCMChannel,
true);
profile_->GetPrefs()->SetBoolean(prefs::kGCMChannelEnabled, true);
EXPECT_EQ(expected_gcm_channel, GetNetworkChannel());
EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel());
}
} // namespace invalidation
......@@ -43,6 +43,8 @@ checkin_proto::ChromeBuildProto_Platform GetPlatform() {
return checkin_proto::ChromeBuildProto_Platform_PLATFORM_WIN;
#elif defined(OS_MACOSX)
return checkin_proto::ChromeBuildProto_Platform_PLATFORM_MAC;
#elif defined(OS_IOS)
return checkin_proto::ChromeBuildProto_Platform_PLATFORM_IOS;
#elif defined(OS_CHROMEOS)
return checkin_proto::ChromeBuildProto_Platform_PLATFORM_CROS;
#elif defined(OS_LINUX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment