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

Unified Diff: chrome/browser/services/gcm/push_messaging_service_impl.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: 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 a4e0840e947047cd60b2b0017134353eb8ea9019..b0006ba5fcb976a24fbed378ec5fd24872d6357c 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.cc
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.cc
@@ -229,7 +229,7 @@ void PushMessagingServiceImpl::RegisterFromDocument(
const std::string& sender_id,
int renderer_id,
int render_frame_id,
- bool user_gesture,
+ bool user_visible_only,
const content::PushMessagingService::RegisterCallback& callback) {
if (!gcm_profile_service_->driver()) {
NOTREACHED() << "There is no GCMDriver. Has GCMProfileService shut down?";
@@ -282,8 +282,13 @@ void PushMessagingServiceImpl::RegisterFromDocument(
return;
}
+ // TODO(miguelg): Consider the value of |user_visible_only| when making
+ // the permission request.
+ // TODO(mlamouri): Move requesting Push permission over to using Mojo, and
+ // re-introduce the ability of |user_gesture| when bubbles require this.
+ // https://crbug.com/423770.
permission_context->RequestPermission(
- web_contents, id, embedding_origin, user_gesture,
+ web_contents, id, embedding_origin, true /* user_gesture */,
base::Bind(&PushMessagingServiceImpl::DidRequestPermission,
weak_factory_.GetWeakPtr(), application_id, sender_id,
callback));

Powered by Google App Engine
This is Rietveld 408576698