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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 void MCSProbe::CheckIn() { | 425 void MCSProbe::CheckIn() { |
426 LOG(INFO) << "Check-in request initiated."; | 426 LOG(INFO) << "Check-in request initiated."; |
427 checkin_proto::ChromeBuildProto chrome_build_proto; | 427 checkin_proto::ChromeBuildProto chrome_build_proto; |
428 chrome_build_proto.set_platform( | 428 chrome_build_proto.set_platform( |
429 checkin_proto::ChromeBuildProto::PLATFORM_LINUX); | 429 checkin_proto::ChromeBuildProto::PLATFORM_LINUX); |
430 chrome_build_proto.set_channel( | 430 chrome_build_proto.set_channel( |
431 checkin_proto::ChromeBuildProto::CHANNEL_CANARY); | 431 checkin_proto::ChromeBuildProto::CHANNEL_CANARY); |
432 chrome_build_proto.set_chrome_version(kChromeVersion); | 432 chrome_build_proto.set_chrome_version(kChromeVersion); |
433 | 433 |
434 CheckinRequest::RequestInfo request_info( | 434 CheckinRequest::RequestInfo request_info( |
435 0, 0, std::string(), std::vector<std::string>(), chrome_build_proto); | 435 0, 0, std::string(), chrome_build_proto); |
436 | 436 |
437 checkin_request_.reset(new CheckinRequest( | 437 checkin_request_.reset(new CheckinRequest( |
438 GServicesSettings::DefaultCheckinURL(), | 438 GServicesSettings::DefaultCheckinURL(), |
439 request_info, | 439 request_info, |
440 kDefaultBackoffPolicy, | 440 kDefaultBackoffPolicy, |
441 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), | 441 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), |
442 url_request_context_getter_.get(), | 442 url_request_context_getter_.get(), |
443 &recorder_)); | 443 &recorder_)); |
444 checkin_request_->Start(); | 444 checkin_request_->Start(); |
445 } | 445 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 return 0; | 499 return 0; |
500 } | 500 } |
501 | 501 |
502 } // namespace | 502 } // namespace |
503 } // namespace gcm | 503 } // namespace gcm |
504 | 504 |
505 int main(int argc, char* argv[]) { | 505 int main(int argc, char* argv[]) { |
506 return gcm::MCSProbeMain(argc, argv); | 506 return gcm::MCSProbeMain(argc, argv); |
507 } | 507 } |
OLD | NEW |