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

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

Issue 261573002: Add checkin activity recording to gcm recorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflicts. 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 chrome_build_proto.set_chrome_version(kChromeVersion); 431 chrome_build_proto.set_chrome_version(kChromeVersion);
432 432
433 CheckinRequest::RequestInfo request_info( 433 CheckinRequest::RequestInfo request_info(
434 0, 0, std::string(), std::vector<std::string>(), chrome_build_proto); 434 0, 0, std::string(), std::vector<std::string>(), chrome_build_proto);
435 435
436 checkin_request_.reset(new CheckinRequest( 436 checkin_request_.reset(new CheckinRequest(
437 GServicesSettings(gcm_store_.get()).checkin_url(), 437 GServicesSettings(gcm_store_.get()).checkin_url(),
438 request_info, 438 request_info,
439 kDefaultBackoffPolicy, 439 kDefaultBackoffPolicy,
440 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), 440 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
441 url_request_context_getter_.get())); 441 url_request_context_getter_.get(),
442 &recorder_));
442 checkin_request_->Start(); 443 checkin_request_->Start();
443 } 444 }
444 445
445 void MCSProbe::OnCheckInCompleted( 446 void MCSProbe::OnCheckInCompleted(
446 const checkin_proto::AndroidCheckinResponse& checkin_response) { 447 const checkin_proto::AndroidCheckinResponse& checkin_response) {
447 bool success = checkin_response.has_android_id() && 448 bool success = checkin_response.has_android_id() &&
448 checkin_response.android_id() != 0UL && 449 checkin_response.android_id() != 0UL &&
449 checkin_response.has_security_token() && 450 checkin_response.has_security_token() &&
450 checkin_response.security_token() != 0UL; 451 checkin_response.security_token() != 0UL;
451 LOG(INFO) << "Check-in request completion " 452 LOG(INFO) << "Check-in request completion "
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 497
497 return 0; 498 return 0;
498 } 499 }
499 500
500 } // namespace 501 } // namespace
501 } // namespace gcm 502 } // namespace gcm
502 503
503 int main(int argc, char* argv[]) { 504 int main(int argc, char* argv[]) {
504 return gcm::MCSProbeMain(argc, argv); 505 return gcm::MCSProbeMain(argc, argv);
505 } 506 }
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