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

Unified Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 226893002: Revert of [GCM] Adding periodic checkin controlled by G-services settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gcm/gcm_client_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3f48762e80b8b9c0038c468272b68a19b3044f69..157a73f355f9289f9c6aa312d2d04667b3f7bdf1 100644
--- a/google_apis/gcm/tools/mcs_probe.cc
+++ b/google_apis/gcm/tools/mcs_probe.cc
@@ -210,8 +210,7 @@
void LoadCallback(scoped_ptr<GCMStore::LoadResult> load_result);
void UpdateCallback(bool success);
void ErrorCallback();
- void OnCheckInCompleted(
- const checkin_proto::AndroidCheckinResponse& checkin_response);
+ void OnCheckInCompleted(uint64 android_id, uint64 secret);
void StartMCSLogin();
base::DefaultClock clock_;
@@ -425,32 +424,24 @@
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(
- request_info,
+ base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
kDefaultBackoffPolicy,
- base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
+ chrome_build_proto,
+ 0,
+ 0,
+ std::vector<std::string>(),
url_request_context_getter_.get()));
checkin_request_->Start();
}
-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;
+void MCSProbe::OnCheckInCompleted(uint64 android_id, uint64 secret) {
LOG(INFO) << "Check-in request completion "
- << (success ? "success!" : "failure!");
-
- if (!success)
+ << (android_id ? "success!" : "failure!");
+ if (!android_id || !secret)
return;
-
- android_id_ = checkin_response.android_id();
- secret_ = checkin_response.security_token();
+ android_id_ = android_id;
+ secret_ = secret;
gcm_store_->SetDeviceCredentials(android_id_,
secret_,
« no previous file with comments | « google_apis/gcm/gcm_client_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698