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

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

Issue 785983002: Have FakeGCMProfileService return different registration IDs each time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/fake_gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
index b5bdb17f1432151ac7b9509bea12d73500e59cb3..064a89163f759b450cf99a67fb85c186afeba2f6 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
@@ -111,7 +111,8 @@ KeyedService* FakeGCMProfileService::Build(content::BrowserContext* context) {
}
FakeGCMProfileService::FakeGCMProfileService(Profile* profile)
- : collect_(false) {
+ : collect_(false),
+ registration_count_(0) {
static_cast<PushMessagingServiceImpl*>(push_messaging_service())
->SetProfileForTesting(profile);
}
@@ -129,7 +130,8 @@ void FakeGCMProfileService::RegisterFinished(
CustomFakeGCMDriver* custom_driver =
static_cast<CustomFakeGCMDriver*>(driver());
custom_driver->OnRegisterFinished(app_id,
- base::UintToString(sender_ids.size()),
+ base::UintToString(1000 * (sender_ids.size() - 1)
+ + (++registration_count_)),
Avi (use Gerrit) 2014/12/08 19:08:43 Put your explanation for this directly into the co
johnme 2014/12/08 20:30:28 Done.
GCMClient::SUCCESS);
}

Powered by Google App Engine
This is Rietveld 408576698