| 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/gcm_driver/gcm_client_impl.h" | 5 #include "components/gcm_driver/gcm_client_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <initializer_list> | 9 #include <initializer_list> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 void OnMessageSendError( | 309 void OnMessageSendError( |
| 310 const std::string& app_id, | 310 const std::string& app_id, |
| 311 const gcm::GCMClient::SendErrorDetails& send_error_details) override; | 311 const gcm::GCMClient::SendErrorDetails& send_error_details) override; |
| 312 void OnSendAcknowledged(const std::string& app_id, | 312 void OnSendAcknowledged(const std::string& app_id, |
| 313 const std::string& message_id) override; | 313 const std::string& message_id) override; |
| 314 void OnGCMReady(const std::vector<AccountMapping>& account_mappings, | 314 void OnGCMReady(const std::vector<AccountMapping>& account_mappings, |
| 315 const base::Time& last_token_fetch_time) override; | 315 const base::Time& last_token_fetch_time) override; |
| 316 void OnActivityRecorded() override {} | 316 void OnActivityRecorded() override {} |
| 317 void OnConnected(const net::IPEndPoint& ip_endpoint) override {} | 317 void OnConnected(const net::IPEndPoint& ip_endpoint) override {} |
| 318 void OnDisconnected() override {} | 318 void OnDisconnected() override {} |
| 319 void OnStoreReset() override {} |
| 319 | 320 |
| 320 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } | 321 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } |
| 321 GCMClientImpl::State gcm_client_state() const { | 322 GCMClientImpl::State gcm_client_state() const { |
| 322 return gcm_client_->state_; | 323 return gcm_client_->state_; |
| 323 } | 324 } |
| 324 FakeMCSClient* mcs_client() const { | 325 FakeMCSClient* mcs_client() const { |
| 325 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); | 326 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); |
| 326 } | 327 } |
| 327 ConnectionFactory* connection_factory() const { | 328 ConnectionFactory* connection_factory() const { |
| 328 return gcm_client_->connection_factory_.get(); | 329 return gcm_client_->connection_factory_.get(); |
| (...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1873 ReceiveMessageFromMCS(message); | 1874 ReceiveMessageFromMCS(message); |
| 1874 | 1875 |
| 1875 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); | 1876 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); |
| 1876 EXPECT_EQ(kExtensionAppId, last_app_id()); | 1877 EXPECT_EQ(kExtensionAppId, last_app_id()); |
| 1877 EXPECT_EQ(expected_data.size(), last_message().data.size()); | 1878 EXPECT_EQ(expected_data.size(), last_message().data.size()); |
| 1878 EXPECT_EQ(expected_data, last_message().data); | 1879 EXPECT_EQ(expected_data, last_message().data); |
| 1879 EXPECT_EQ(kSender, last_message().sender_id); | 1880 EXPECT_EQ(kSender, last_message().sender_id); |
| 1880 } | 1881 } |
| 1881 | 1882 |
| 1882 } // namespace gcm | 1883 } // namespace gcm |
| OLD | NEW |