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(gcm_store_path_, | 303 new GCMStoreImpl(true, |
| 304 gcm_store_path_, |
304 file_thread_.message_loop_proxy())); | 305 file_thread_.message_loop_proxy())); |
305 mcs_client_.reset(new MCSClient("probe", | 306 mcs_client_.reset(new MCSClient("probe", |
306 &clock_, | 307 &clock_, |
307 connection_factory_.get(), | 308 connection_factory_.get(), |
308 gcm_store_.get())); | 309 gcm_store_.get())); |
309 run_loop_.reset(new base::RunLoop()); | 310 run_loop_.reset(new base::RunLoop()); |
310 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, | 311 gcm_store_->Load(base::Bind(&MCSProbe::LoadCallback, |
311 base::Unretained(this))); | 312 base::Unretained(this))); |
312 run_loop_->Run(); | 313 run_loop_->Run(); |
313 } | 314 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 482 |
482 return 0; | 483 return 0; |
483 } | 484 } |
484 | 485 |
485 } // namespace | 486 } // namespace |
486 } // namespace gcm | 487 } // namespace gcm |
487 | 488 |
488 int main(int argc, char* argv[]) { | 489 int main(int argc, char* argv[]) { |
489 return gcm::MCSProbeMain(argc, argv); | 490 return gcm::MCSProbeMain(argc, argv); |
490 } | 491 } |
OLD | NEW |