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

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

Issue 2133673002: Push API: Implement and ship PushSubscription.options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add MODULES_EXPORT Created 4 years, 5 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: content/renderer/push_messaging/push_messaging_dispatcher.cc
diff --git a/content/renderer/push_messaging/push_messaging_dispatcher.cc b/content/renderer/push_messaging/push_messaging_dispatcher.cc
index 46f0687700238a6280a6a7265206cd72eaf80f76..75e6e1032db9f778ff7ec922dd1dc85b90415a3b 100644
--- a/content/renderer/push_messaging/push_messaging_dispatcher.cc
+++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc
@@ -115,14 +115,16 @@ void PushMessagingDispatcher::DoSubscribe(
void PushMessagingDispatcher::OnSubscribeFromDocumentSuccess(
int32_t request_id,
const GURL& endpoint,
+ const PushSubscriptionOptions& options,
const std::vector<uint8_t>& p256dh,
const std::vector<uint8_t>& auth) {
blink::WebPushSubscriptionCallbacks* callbacks =
subscription_callbacks_.Lookup(request_id);
DCHECK(callbacks);
- callbacks->onSuccess(
- base::WrapUnique(new blink::WebPushSubscription(endpoint, p256dh, auth)));
+ callbacks->onSuccess(base::WrapUnique(new blink::WebPushSubscription(
+ endpoint, options.user_visible_only,
+ blink::WebString::fromLatin1(options.sender_info), p256dh, auth)));
subscription_callbacks_.Remove(request_id);
}

Powered by Google App Engine
This is Rietveld 408576698