| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 checkin_proto::ChromeBuildProto::CHANNEL_CANARY); | 419 checkin_proto::ChromeBuildProto::CHANNEL_CANARY); |
| 420 chrome_build_proto.set_chrome_version(kChromeVersion); | 420 chrome_build_proto.set_chrome_version(kChromeVersion); |
| 421 | 421 |
| 422 CheckinRequest::RequestInfo request_info(0, | 422 CheckinRequest::RequestInfo request_info(0, |
| 423 0, | 423 0, |
| 424 std::map<std::string, std::string>(), | 424 std::map<std::string, std::string>(), |
| 425 std::string(), | 425 std::string(), |
| 426 chrome_build_proto); | 426 chrome_build_proto); |
| 427 | 427 |
| 428 checkin_request_.reset(new CheckinRequest( | 428 checkin_request_.reset(new CheckinRequest( |
| 429 GServicesSettings::DefaultCheckinURL(), | 429 GServicesSettings().GetCheckinURL(), |
| 430 request_info, | 430 request_info, |
| 431 kDefaultBackoffPolicy, | 431 kDefaultBackoffPolicy, |
| 432 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), | 432 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), |
| 433 url_request_context_getter_.get(), | 433 url_request_context_getter_.get(), |
| 434 &recorder_)); | 434 &recorder_)); |
| 435 checkin_request_->Start(); | 435 checkin_request_->Start(); |
| 436 } | 436 } |
| 437 | 437 |
| 438 void MCSProbe::OnCheckInCompleted( | 438 void MCSProbe::OnCheckInCompleted( |
| 439 const checkin_proto::AndroidCheckinResponse& checkin_response) { | 439 const checkin_proto::AndroidCheckinResponse& checkin_response) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 return 0; | 491 return 0; |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace | 494 } // namespace |
| 495 } // namespace gcm | 495 } // namespace gcm |
| 496 | 496 |
| 497 int main(int argc, char* argv[]) { | 497 int main(int argc, char* argv[]) { |
| 498 return gcm::MCSProbeMain(argc, argv); | 498 return gcm::MCSProbeMain(argc, argv); |
| 499 } | 499 } |
| OLD | NEW |