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 "base/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "base/strings/string_split.h" | 6 #include "base/strings/string_split.h" |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "components/invalidation/impl/gcm_network_channel.h" | 9 #include "components/invalidation/impl/gcm_network_channel.h" |
10 #include "google_apis/gaia/google_service_auth_error.h" | 10 #include "google_apis/gaia/google_service_auth_error.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 static bool Base64DecodeURLSafe(const std::string& input, | 163 static bool Base64DecodeURLSafe(const std::string& input, |
164 std::string* output) { | 164 std::string* output) { |
165 return GCMNetworkChannel::Base64DecodeURLSafe(input, output); | 165 return GCMNetworkChannel::Base64DecodeURLSafe(input, output); |
166 } | 166 } |
167 | 167 |
168 void OnNetworkChannelStateChanged( | 168 void OnNetworkChannelStateChanged( |
169 InvalidatorState invalidator_state) override { | 169 InvalidatorState invalidator_state) override { |
170 last_invalidator_state_ = invalidator_state; | 170 last_invalidator_state_ = invalidator_state; |
171 } | 171 } |
172 | 172 |
173 void OnIncomingMessage(std::string incoming_message) { | 173 void OnIncomingMessage(std::string /* incoming_message */) {} |
174 } | |
175 | 174 |
176 GCMNetworkChannel* network_channel() { | 175 GCMNetworkChannel* network_channel() { |
177 return gcm_network_channel_.get(); | 176 return gcm_network_channel_.get(); |
178 } | 177 } |
179 | 178 |
180 TestGCMNetworkChannelDelegate* delegate() { | 179 TestGCMNetworkChannelDelegate* delegate() { |
181 return delegate_; | 180 return delegate_; |
182 } | 181 } |
183 | 182 |
184 int url_fetchers_created_count() { | 183 int url_fetchers_created_count() { |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 delegate()->request_token_callback.Run( | 504 delegate()->request_token_callback.Run( |
506 GoogleServiceAuthError::AuthErrorNone(), "access.token"); | 505 GoogleServiceAuthError::AuthErrorNone(), "access.token"); |
507 RunLoopUntilIdle(); | 506 RunLoopUntilIdle(); |
508 EXPECT_EQ(url_fetchers_created_count(), 3); | 507 EXPECT_EQ(url_fetchers_created_count(), 3); |
509 // Echo_token should be from second message. | 508 // Echo_token should be from second message. |
510 EXPECT_EQ("echo.token", get_last_echo_token()); | 509 EXPECT_EQ("echo.token", get_last_echo_token()); |
511 } | 510 } |
512 #endif | 511 #endif |
513 | 512 |
514 } // namespace syncer | 513 } // namespace syncer |
OLD | NEW |