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

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..f13a309a81d2ec63117bf348e77d3a7b283cdbeb 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,12 @@ 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.
mlamouri (slow - plz ping) 2014/12/03 15:29:01 Could you point to the bug. plz.
Peter Beverloo 2014/12/03 15:41:10 Pointed to 423770.
permission_context->RequestPermission(
- web_contents, id, embedding_origin, user_gesture,
+ web_contents, id, embedding_origin, true /* user_gesture */,
johnme 2014/12/03 15:36:31 It's not clear from https://crbug.com/423770 what
Peter Beverloo 2014/12/03 15:41:10 Negative. Push is the feature using IPC-based perm
base::Bind(&PushMessagingServiceImpl::DidRequestPermission,
weak_factory_.GetWeakPtr(), application_id, sender_id,
callback));

Powered by Google App Engine
This is Rietveld 408576698