| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 void OnMessageSendError( | 315 void OnMessageSendError( |
| 316 const std::string& app_id, | 316 const std::string& app_id, |
| 317 const gcm::GCMClient::SendErrorDetails& send_error_details) override; | 317 const gcm::GCMClient::SendErrorDetails& send_error_details) override; |
| 318 void OnSendAcknowledged(const std::string& app_id, | 318 void OnSendAcknowledged(const std::string& app_id, |
| 319 const std::string& message_id) override; | 319 const std::string& message_id) override; |
| 320 void OnGCMReady(const std::vector<AccountMapping>& account_mappings, | 320 void OnGCMReady(const std::vector<AccountMapping>& account_mappings, |
| 321 const base::Time& last_token_fetch_time) override; | 321 const base::Time& last_token_fetch_time) override; |
| 322 void OnActivityRecorded() override {} | 322 void OnActivityRecorded() override {} |
| 323 void OnConnected(const net::IPEndPoint& ip_endpoint) override {} | 323 void OnConnected(const net::IPEndPoint& ip_endpoint) override {} |
| 324 void OnDisconnected() override {} | 324 void OnDisconnected() override {} |
| 325 void OnStoreReset() override {} |
| 325 | 326 |
| 326 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } | 327 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } |
| 327 GCMClientImpl::State gcm_client_state() const { | 328 GCMClientImpl::State gcm_client_state() const { |
| 328 return gcm_client_->state_; | 329 return gcm_client_->state_; |
| 329 } | 330 } |
| 330 FakeMCSClient* mcs_client() const { | 331 FakeMCSClient* mcs_client() const { |
| 331 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); | 332 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); |
| 332 } | 333 } |
| 333 ConnectionFactory* connection_factory() const { | 334 ConnectionFactory* connection_factory() const { |
| 334 return gcm_client_->connection_factory_.get(); | 335 return gcm_client_->connection_factory_.get(); |
| (...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 ReceiveMessageFromMCS(message); | 1916 ReceiveMessageFromMCS(message); |
| 1916 | 1917 |
| 1917 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); | 1918 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); |
| 1918 EXPECT_EQ(kExtensionAppId, last_app_id()); | 1919 EXPECT_EQ(kExtensionAppId, last_app_id()); |
| 1919 EXPECT_EQ(expected_data.size(), last_message().data.size()); | 1920 EXPECT_EQ(expected_data.size(), last_message().data.size()); |
| 1920 EXPECT_EQ(expected_data, last_message().data); | 1921 EXPECT_EQ(expected_data, last_message().data); |
| 1921 EXPECT_EQ(kSender, last_message().sender_id); | 1922 EXPECT_EQ(kSender, last_message().sender_id); |
| 1922 } | 1923 } |
| 1923 | 1924 |
| 1924 } // namespace gcm | 1925 } // namespace gcm |
| OLD | NEW |