Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 248213004: Record connection, registration, and receiving activities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « google_apis/gcm/monitoring/gcm_stats_recorder_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « google_apis/gcm/monitoring/gcm_stats_recorder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698