| Index: google_apis/gcm/tools/mcs_probe.cc
|
| diff --git a/google_apis/gcm/tools/mcs_probe.cc b/google_apis/gcm/tools/mcs_probe.cc
|
| index 6d9a7d5d47fdd31aa020d38ef34ba72db131c3bb..038f3af8c1b02e6dba5d463a6afe38ba1bf96a00 100644
|
| --- a/google_apis/gcm/tools/mcs_probe.cc
|
| +++ b/google_apis/gcm/tools/mcs_probe.cc
|
| @@ -210,7 +210,8 @@ class MCSProbe {
|
| void LoadCallback(scoped_ptr<GCMStore::LoadResult> load_result);
|
| void UpdateCallback(bool success);
|
| void ErrorCallback();
|
| - void OnCheckInCompleted(uint64 android_id, uint64 secret);
|
| + void OnCheckInCompleted(
|
| + const checkin_proto::AndroidCheckinResponse& checkin_response);
|
| void StartMCSLogin();
|
|
|
| base::DefaultClock clock_;
|
| @@ -423,24 +424,32 @@ void MCSProbe::CheckIn() {
|
| chrome_build_proto.set_channel(
|
| checkin_proto::ChromeBuildProto::CHANNEL_CANARY);
|
| chrome_build_proto.set_chrome_version(kChromeVersion);
|
| +
|
| + CheckinRequest::RequestInfo request_info(
|
| + 0, 0, std::string(), std::vector<std::string>(), chrome_build_proto);
|
| +
|
| checkin_request_.reset(new CheckinRequest(
|
| - base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
|
| + request_info,
|
| kDefaultBackoffPolicy,
|
| - chrome_build_proto,
|
| - 0,
|
| - 0,
|
| - std::vector<std::string>(),
|
| + base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
|
| url_request_context_getter_.get()));
|
| checkin_request_->Start();
|
| }
|
|
|
| -void MCSProbe::OnCheckInCompleted(uint64 android_id, uint64 secret) {
|
| +void MCSProbe::OnCheckInCompleted(
|
| + const checkin_proto::AndroidCheckinResponse& checkin_response) {
|
| + bool success = checkin_response.has_android_id() &&
|
| + checkin_response.android_id() != 0UL &&
|
| + checkin_response.has_security_token() &&
|
| + checkin_response.security_token() != 0UL;
|
| LOG(INFO) << "Check-in request completion "
|
| - << (android_id ? "success!" : "failure!");
|
| - if (!android_id || !secret)
|
| + << (success ? "success!" : "failure!");
|
| +
|
| + if (!success)
|
| return;
|
| - android_id_ = android_id;
|
| - secret_ = secret;
|
| +
|
| + android_id_ = checkin_response.android_id();
|
| + secret_ = checkin_response.security_token();
|
|
|
| gcm_store_->SetDeviceCredentials(android_id_,
|
| secret_,
|
|
|