| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 std::vector<GURL> endpoints(1, | 293 std::vector<GURL> endpoints(1, |
| 294 GURL("https://" + | 294 GURL("https://" + |
| 295 net::HostPortPair(server_host_, | 295 net::HostPortPair(server_host_, |
| 296 server_port_).ToString())); | 296 server_port_).ToString())); |
| 297 connection_factory_.reset( | 297 connection_factory_.reset( |
| 298 new ConnectionFactoryImpl(endpoints, | 298 new ConnectionFactoryImpl(endpoints, |
| 299 kDefaultBackoffPolicy, | 299 kDefaultBackoffPolicy, |
| 300 network_session_, | 300 network_session_, |
| 301 &net_log_)); | 301 &net_log_)); |
| 302 gcm_store_.reset( | 302 gcm_store_.reset( |
| 303 new GCMStoreImpl(true, | 303 new GCMStoreImpl(gcm_store_path_, |
| 304 gcm_store_path_, | |
| 305 file_thread_.message_loop_proxy())); | 304 file_thread_.message_loop_proxy())); |
| 306 mcs_client_.reset(new MCSClient("probe", | 305 mcs_client_.reset(new MCSClient("probe", |
| 307 &clock_, | 306 &clock_, |
| 308 connection_factory_.get(), | 307 connection_factory_.get(), |
| 309 gcm_store_.get())); | 308 gcm_store_.get())); |
| 310 run_loop_.reset(new base::RunLoop()); | 309 run_loop_.reset(new base::RunLoop()); |
| 311 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, | 310 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, |
| 312 base::Unretained(this))); | 311 base::Unretained(this))); |
| 313 run_loop_->Run(); | 312 run_loop_->Run(); |
| 314 } | 313 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 481 |
| 483 return 0; | 482 return 0; |
| 484 } | 483 } |
| 485 | 484 |
| 486 } // namespace | 485 } // namespace |
| 487 } // namespace gcm | 486 } // namespace gcm |
| 488 | 487 |
| 489 int main(int argc, char* argv[]) { | 488 int main(int argc, char* argv[]) { |
| 490 return gcm::MCSProbeMain(argc, argv); | 489 return gcm::MCSProbeMain(argc, argv); |
| 491 } | 490 } |
| OLD | NEW |