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

Unified Diff: content/renderer/push_messaging/push_messaging_client.cc

Issue 2712693002: Implement some follow-ups after mojofiction of Push-messaging. (Closed)
Patch Set: code rebase Created 3 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
« no previous file with comments | « content/renderer/push_messaging/push_messaging_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/push_messaging/push_messaging_client.cc
diff --git a/content/renderer/push_messaging/push_messaging_client.cc b/content/renderer/push_messaging/push_messaging_client.cc
index 3cef773bb8b7e8ce9512b9df971e9e114e18ea11..0ec384e1217536d5e6b4840d81275267d62246cd 100644
--- a/content/renderer/push_messaging/push_messaging_client.cc
+++ b/content/renderer/push_messaging/push_messaging_client.cc
@@ -77,10 +77,9 @@ void PushMessagingClient::DidGetManifest(
// Get the sender_info from the manifest since it wasn't provided by
// the caller.
if (manifest.IsEmpty()) {
- SubscribeCallback(std::move(callbacks),
- PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING,
- base::nullopt, base::nullopt, base::nullopt,
- base::nullopt);
+ DidSubscribe(std::move(callbacks),
+ PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING,
+ base::nullopt, base::nullopt, base::nullopt, base::nullopt);
return;
}
@@ -105,9 +104,8 @@ void PushMessagingClient::DoSubscribe(
->registrationId();
if (options.sender_info.empty()) {
- SubscribeCallback(std::move(callbacks),
- PUSH_REGISTRATION_STATUS_NO_SENDER_ID, base::nullopt,
- base::nullopt, base::nullopt, base::nullopt);
+ DidSubscribe(std::move(callbacks), PUSH_REGISTRATION_STATUS_NO_SENDER_ID,
+ base::nullopt, base::nullopt, base::nullopt, base::nullopt);
return;
}
@@ -116,11 +114,11 @@ void PushMessagingClient::DoSubscribe(
routing_id(), service_worker_registration_id, options,
// Safe to use base::Unretained because |push_messaging_manager_ |is
// owned by |this|.
- base::Bind(&PushMessagingClient::SubscribeCallback,
- base::Unretained(this), base::Passed(&callbacks)));
+ base::Bind(&PushMessagingClient::DidSubscribe, base::Unretained(this),
+ base::Passed(&callbacks)));
}
-void PushMessagingClient::SubscribeCallback(
+void PushMessagingClient::DidSubscribe(
std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks,
content::PushRegistrationStatus status,
const base::Optional<GURL>& endpoint,
« no previous file with comments | « content/renderer/push_messaging/push_messaging_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698