GCM Checkin implementation with unit tests.
BUG=284553
Review URL: https://codereview.chromium.org/98173009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243729 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/services/gcm/gcm_client_mock.cc b/chrome/browser/services/gcm/gcm_client_mock.cc
index e060fff..35da43d 100644
--- a/chrome/browser/services/gcm/gcm_client_mock.cc
+++ b/chrome/browser/services/gcm/gcm_client_mock.cc
@@ -47,9 +47,9 @@
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
// Simulate the android_id and secret by some sort of hashing.
- CheckInInfo checkin_info;
+ CheckinInfo checkin_info;
if (!simulate_server_error_)
- checkin_info = GetCheckInInfoFromUsername(username);
+ checkin_info = GetCheckinInfoFromUsername(username);
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -146,9 +146,9 @@
}
// static
-GCMClient::CheckInInfo GCMClientMock::GetCheckInInfoFromUsername(
+GCMClient::CheckinInfo GCMClientMock::GetCheckinInfoFromUsername(
const std::string& username) {
- CheckInInfo checkin_info;
+ CheckinInfo checkin_info;
checkin_info.android_id = HashToUInt64(username);
checkin_info.secret = checkin_info.android_id / 10;
return checkin_info;
@@ -181,7 +181,7 @@
}
void GCMClientMock::CheckInFinished(std::string username,
- CheckInInfo checkin_info) {
+ CheckinInfo checkin_info) {
GetDelegate(username)->OnCheckInFinished(
checkin_info, checkin_info.IsValid() ? SUCCESS : SERVER_ERROR);
}