| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // A standalone tool for testing MCS connections and the MCS client on their | 5 // A standalone tool for testing MCS connections and the MCS client on their |
| 6 // own. | 6 // own. |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <cstdio> | 9 #include <cstdio> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 InitializeNetworkState(); | 294 InitializeNetworkState(); |
| 295 BuildNetworkSession(); | 295 BuildNetworkSession(); |
| 296 std::vector<GURL> endpoints(1, | 296 std::vector<GURL> endpoints(1, |
| 297 GURL("https://" + | 297 GURL("https://" + |
| 298 net::HostPortPair(server_host_, | 298 net::HostPortPair(server_host_, |
| 299 server_port_).ToString())); | 299 server_port_).ToString())); |
| 300 connection_factory_.reset( | 300 connection_factory_.reset( |
| 301 new ConnectionFactoryImpl(endpoints, | 301 new ConnectionFactoryImpl(endpoints, |
| 302 kDefaultBackoffPolicy, | 302 kDefaultBackoffPolicy, |
| 303 network_session_, | 303 network_session_, |
| 304 &net_log_)); | 304 &net_log_, |
| 305 &recorder_)); |
| 305 gcm_store_.reset( | 306 gcm_store_.reset( |
| 306 new GCMStoreImpl(gcm_store_path_, | 307 new GCMStoreImpl(gcm_store_path_, |
| 307 file_thread_.message_loop_proxy())); | 308 file_thread_.message_loop_proxy())); |
| 308 mcs_client_.reset(new MCSClient("probe", | 309 mcs_client_.reset(new MCSClient("probe", |
| 309 &clock_, | 310 &clock_, |
| 310 connection_factory_.get(), | 311 connection_factory_.get(), |
| 311 gcm_store_.get(), | 312 gcm_store_.get(), |
| 312 &recorder_)); | 313 &recorder_)); |
| 313 run_loop_.reset(new base::RunLoop()); | 314 run_loop_.reset(new base::RunLoop()); |
| 314 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, | 315 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 494 |
| 494 return 0; | 495 return 0; |
| 495 } | 496 } |
| 496 | 497 |
| 497 } // namespace | 498 } // namespace |
| 498 } // namespace gcm | 499 } // namespace gcm |
| 499 | 500 |
| 500 int main(int argc, char* argv[]) { | 501 int main(int argc, char* argv[]) { |
| 501 return gcm::MCSProbeMain(argc, argv); | 502 return gcm::MCSProbeMain(argc, argv); |
| 502 } | 503 } |
| OLD | NEW |