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

Unified Diff: content/renderer/push_messaging_dispatcher.cc

Issue 770023002: Push registration should read a "gcm_user_visible_only" key from the Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment fix 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: content/renderer/push_messaging_dispatcher.cc
diff --git a/content/renderer/push_messaging_dispatcher.cc b/content/renderer/push_messaging_dispatcher.cc
index 3289257fe92919d05aef10c12315f532d3a39e34..57a7f8bb86aef90a3180f5b502ec5eab626dbc31 100644
--- a/content/renderer/push_messaging_dispatcher.cc
+++ b/content/renderer/push_messaging_dispatcher.cc
@@ -68,13 +68,17 @@ void PushMessagingDispatcher::DoRegister(
return;
}
+ PushRegistrationParams params;
+ params.sender_id = manifest.gcm_sender_id.is_null()
+ ? std::string() : base::UTF16ToUTF8(manifest.gcm_sender_id.string());
+ params.user_visible_only = manifest.gcm_user_visible_only;
+ params.user_gesture =
+ blink::WebUserGestureIndicator::isProcessingUserGesture();
+
Send(new PushMessagingHostMsg_Register(
routing_id(),
callbacks_id,
- manifest.gcm_sender_id.is_null()
- ? std::string()
- : base::UTF16ToUTF8(manifest.gcm_sender_id.string()),
- blink::WebUserGestureIndicator::isProcessingUserGesture(),
+ params,
service_worker_provider_id));
}

Powered by Google App Engine
This is Rietveld 408576698