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

Unified Diff: chrome/browser/services/gcm/gcm_client_mock.cc

Issue 98173009: GCM Checkin implementation with unit tests and protobufs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-store
Patch Set: Updating the copyright notice Created 6 years, 11 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
Index: chrome/browser/services/gcm/gcm_client_mock.cc
diff --git a/chrome/browser/services/gcm/gcm_client_mock.cc b/chrome/browser/services/gcm/gcm_client_mock.cc
index e060fffbf5f0a38fe82daf5ba4e36b56e8ab46da..35da43d4c0b44f26d305de3b453a1d46b8a04fb8 100644
--- a/chrome/browser/services/gcm/gcm_client_mock.cc
+++ b/chrome/browser/services/gcm/gcm_client_mock.cc
@@ -47,9 +47,9 @@ void GCMClientMock::CheckIn(const std::string& username) {
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 @@ void GCMClientMock::SetIsLoading(bool is_loading) {
}
// 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 @@ GCMClient::Delegate* GCMClientMock::GetDelegate(
}
void GCMClientMock::CheckInFinished(std::string username,
- CheckInInfo checkin_info) {
+ CheckinInfo checkin_info) {
GetDelegate(username)->OnCheckInFinished(
checkin_info, checkin_info.IsValid() ? SUCCESS : SERVER_ERROR);
}

Powered by Google App Engine
This is Rietveld 408576698