OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/invalidation/impl/ticl_profile_settings_provider.h" | 5 #include "components/invalidation/impl/ticl_profile_settings_provider.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
9 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
10 #include "components/gcm_driver/fake_gcm_driver.h" | 11 #include "components/gcm_driver/fake_gcm_driver.h" |
11 #include "components/gcm_driver/gcm_channel_status_syncer.h" | 12 #include "components/gcm_driver/gcm_channel_status_syncer.h" |
12 #include "components/invalidation/impl/fake_invalidation_state_tracker.h" | 13 #include "components/invalidation/impl/fake_invalidation_state_tracker.h" |
13 #include "components/invalidation/impl/invalidation_prefs.h" | 14 #include "components/invalidation/impl/invalidation_prefs.h" |
14 #include "components/invalidation/impl/invalidation_state_tracker.h" | 15 #include "components/invalidation/impl/invalidation_state_tracker.h" |
15 #include "components/invalidation/impl/profile_invalidation_provider.h" | 16 #include "components/invalidation/impl/profile_invalidation_provider.h" |
16 #include "components/invalidation/impl/ticl_invalidation_service.h" | 17 #include "components/invalidation/impl/ticl_invalidation_service.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 pref_service_.SetBoolean(prefs::kInvalidationServiceUseGCMChannel, true); | 103 pref_service_.SetBoolean(prefs::kInvalidationServiceUseGCMChannel, true); |
103 EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel()); | 104 EXPECT_EQ(TiclInvalidationService::GCM_NETWORK_CHANNEL, GetNetworkChannel()); |
104 | 105 |
105 // If invalidation channel setting is set to false, fall back to push channel. | 106 // If invalidation channel setting is set to false, fall back to push channel. |
106 pref_service_.SetBoolean(gcm::prefs::kGCMChannelStatus, true); | 107 pref_service_.SetBoolean(gcm::prefs::kGCMChannelStatus, true); |
107 pref_service_.SetBoolean(prefs::kInvalidationServiceUseGCMChannel, false); | 108 pref_service_.SetBoolean(prefs::kInvalidationServiceUseGCMChannel, false); |
108 EXPECT_EQ(TiclInvalidationService::PUSH_CLIENT_CHANNEL, GetNetworkChannel()); | 109 EXPECT_EQ(TiclInvalidationService::PUSH_CLIENT_CHANNEL, GetNetworkChannel()); |
109 } | 110 } |
110 | 111 |
111 } // namespace invalidation | 112 } // namespace invalidation |
OLD | NEW |