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

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

Issue 183923006: [GCM] API update to allow only a single sender in registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates based on CR. Changing how the senders/reg_ids are stored to avoid upgrade to multiple sedne… Created 6 years, 10 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/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 c124f4f5ad21e72b98bc82813955a18625f9d55b..66748a8381a34f4c8518616ef527e1b319c79e6a 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
@@ -26,7 +26,7 @@ FakeGCMProfileService::FakeGCMProfileService(Profile* profile)
FakeGCMProfileService::~FakeGCMProfileService() {}
void FakeGCMProfileService::Register(const std::string& app_id,
- const std::vector<std::string>& sender_ids,
+ const std::string& sender_id,
const std::string& cert,
RegisterCallback callback) {
base::MessageLoop::current()->PostTask(
@@ -34,23 +34,23 @@ void FakeGCMProfileService::Register(const std::string& app_id,
base::Bind(&FakeGCMProfileService::RegisterFinished,
base::Unretained(this),
app_id,
- sender_ids,
+ sender_id,
cert,
callback));
}
void FakeGCMProfileService::RegisterFinished(
const std::string& app_id,
- const std::vector<std::string>& sender_ids,
+ const std::string& sender_id,
const std::string& cert,
RegisterCallback callback) {
if (collect_) {
last_registered_app_id_ = app_id;
- last_registered_sender_ids_ = sender_ids;
+ last_registered_sender_id_ = sender_id;
last_registered_cert_ = cert;
}
- callback.Run(base::UintToString(sender_ids.size()), GCMClient::SUCCESS);
+ callback.Run(base::UintToString(sender_id.size()), GCMClient::SUCCESS);
}
void FakeGCMProfileService::Send(const std::string& app_id,

Powered by Google App Engine
This is Rietveld 408576698