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 "google_apis/gcm/gcm_client_impl.h" | 5 #include "google_apis/gcm/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 const std::string& message_id, | 243 const std::string& message_id, |
244 GCMClient::Result result) OVERRIDE {} | 244 GCMClient::Result result) OVERRIDE {} |
245 virtual void OnMessageReceived(const std::string& registration_id, | 245 virtual void OnMessageReceived(const std::string& registration_id, |
246 const GCMClient::IncomingMessage& message) | 246 const GCMClient::IncomingMessage& message) |
247 OVERRIDE; | 247 OVERRIDE; |
248 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; | 248 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; |
249 virtual void OnMessageSendError( | 249 virtual void OnMessageSendError( |
250 const std::string& app_id, | 250 const std::string& app_id, |
251 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; | 251 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; |
252 virtual void OnGCMReady() OVERRIDE; | 252 virtual void OnGCMReady() OVERRIDE; |
| 253 virtual void OnActivityRecorded() OVERRIDE {} |
253 | 254 |
254 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } | 255 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } |
255 FakeMCSClient* mcs_client() const { | 256 FakeMCSClient* mcs_client() const { |
256 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); | 257 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); |
257 } | 258 } |
258 ConnectionFactory* connection_factory() const { | 259 ConnectionFactory* connection_factory() const { |
259 return gcm_client_->connection_factory_.get(); | 260 return gcm_client_->connection_factory_.get(); |
260 } | 261 } |
261 | 262 |
262 void reset_last_event() { | 263 void reset_last_event() { |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 gservices_settings().checkin_interval()); | 768 gservices_settings().checkin_interval()); |
768 EXPECT_EQ(GURL("http://alternative.url/checkin"), | 769 EXPECT_EQ(GURL("http://alternative.url/checkin"), |
769 gservices_settings().checkin_url()); | 770 gservices_settings().checkin_url()); |
770 EXPECT_EQ(GURL("http://alternative.url/registration"), | 771 EXPECT_EQ(GURL("http://alternative.url/registration"), |
771 gservices_settings().registration_url()); | 772 gservices_settings().registration_url()); |
772 EXPECT_EQ("http://alternative.gcm.host", gservices_settings().mcs_hostname()); | 773 EXPECT_EQ("http://alternative.gcm.host", gservices_settings().mcs_hostname()); |
773 EXPECT_EQ(443, gservices_settings().mcs_secure_port()); | 774 EXPECT_EQ(443, gservices_settings().mcs_secure_port()); |
774 } | 775 } |
775 | 776 |
776 } // namespace gcm | 777 } // namespace gcm |
OLD | NEW |