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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
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(0, |
435 0, 0, std::string(), chrome_build_proto); | 435 0, |
| 436 std::map<std::string, std::string>(), |
| 437 std::string(), |
| 438 chrome_build_proto); |
436 | 439 |
437 checkin_request_.reset(new CheckinRequest( | 440 checkin_request_.reset(new CheckinRequest( |
438 GServicesSettings::DefaultCheckinURL(), | 441 GServicesSettings::DefaultCheckinURL(), |
439 request_info, | 442 request_info, |
440 kDefaultBackoffPolicy, | 443 kDefaultBackoffPolicy, |
441 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), | 444 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), |
442 url_request_context_getter_.get(), | 445 url_request_context_getter_.get(), |
443 &recorder_)); | 446 &recorder_)); |
444 checkin_request_->Start(); | 447 checkin_request_->Start(); |
445 } | 448 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 501 |
499 return 0; | 502 return 0; |
500 } | 503 } |
501 | 504 |
502 } // namespace | 505 } // namespace |
503 } // namespace gcm | 506 } // namespace gcm |
504 | 507 |
505 int main(int argc, char* argv[]) { | 508 int main(int argc, char* argv[]) { |
506 return gcm::MCSProbeMain(argc, argv); | 509 return gcm::MCSProbeMain(argc, argv); |
507 } | 510 } |
OLD | NEW |