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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 GCMClient::Result result) OVERRIDE {} | 243 GCMClient::Result result) OVERRIDE {} |
244 virtual void OnMessageReceived(const std::string& registration_id, | 244 virtual void OnMessageReceived(const std::string& registration_id, |
245 const GCMClient::IncomingMessage& message) | 245 const GCMClient::IncomingMessage& message) |
246 OVERRIDE; | 246 OVERRIDE; |
247 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; | 247 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; |
248 virtual void OnMessageSendError( | 248 virtual void OnMessageSendError( |
249 const std::string& app_id, | 249 const std::string& app_id, |
250 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; | 250 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; |
251 virtual void OnGCMReady() OVERRIDE; | 251 virtual void OnGCMReady() OVERRIDE; |
252 virtual void OnActivityRecorded() OVERRIDE {} | 252 virtual void OnActivityRecorded() OVERRIDE {} |
| 253 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) OVERRIDE {} |
| 254 virtual void OnDisconnected() OVERRIDE {} |
253 | 255 |
254 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } | 256 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } |
255 FakeMCSClient* mcs_client() const { | 257 FakeMCSClient* mcs_client() const { |
256 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); | 258 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); |
257 } | 259 } |
258 ConnectionFactory* connection_factory() const { | 260 ConnectionFactory* connection_factory() const { |
259 return gcm_client_->connection_factory_.get(); | 261 return gcm_client_->connection_factory_.get(); |
260 } | 262 } |
261 | 263 |
262 void reset_last_event() { | 264 void reset_last_event() { |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 gservices_settings().GetCheckinURL()); | 773 gservices_settings().GetCheckinURL()); |
772 EXPECT_EQ(GURL("http://alternative.url/registration"), | 774 EXPECT_EQ(GURL("http://alternative.url/registration"), |
773 gservices_settings().GetRegistrationURL()); | 775 gservices_settings().GetRegistrationURL()); |
774 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), | 776 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), |
775 gservices_settings().GetMCSMainEndpoint()); | 777 gservices_settings().GetMCSMainEndpoint()); |
776 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), | 778 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), |
777 gservices_settings().GetMCSFallbackEndpoint()); | 779 gservices_settings().GetMCSFallbackEndpoint()); |
778 } | 780 } |
779 | 781 |
780 } // namespace gcm | 782 } // namespace gcm |
OLD | NEW |