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

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

Issue 778243002: Push API: Return cached registration if available. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@store2
Patch Set: Address review comments 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/push_messaging_service_impl.cc
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.cc b/chrome/browser/services/gcm/push_messaging_service_impl.cc
index 80051f95a980c0820f098d9e6bf85442952a446d..9f839bda438f38d77635a109397e0fe75b3158a9 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.cc
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.cc
@@ -372,7 +372,7 @@ void PushMessagingServiceImpl::RegisterEnd(
const std::string& registration_id,
content::PushRegistrationStatus status) {
callback.Run(registration_id, status);
- if (status == content::PUSH_REGISTRATION_STATUS_SUCCESS)
+ if (status == content::PUSH_REGISTRATION_STATUS_SUCCESS_FROM_PUSH_SERVICE)
IncreasePushRegistrationCount(1);
}
@@ -382,7 +382,7 @@ void PushMessagingServiceImpl::DidRegister(
GCMClient::Result result) {
content::PushRegistrationStatus status =
result == GCMClient::SUCCESS
- ? content::PUSH_REGISTRATION_STATUS_SUCCESS
+ ? content::PUSH_REGISTRATION_STATUS_SUCCESS_FROM_PUSH_SERVICE
: content::PUSH_REGISTRATION_STATUS_SERVICE_ERROR;
RegisterEnd(callback, registration_id, status);
}

Powered by Google App Engine
This is Rietveld 408576698