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

Issue 343743004: Implement a permission check for push. (Closed)

Created:
6 years, 6 months ago by Miguel Garcia
Modified:
6 years ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dbeam+watch-options_chromium.org, jam, markusheintz_, tfarina
Project:
chromium
Visibility:
Public.

Description

Implement a permission check for push. Extracted common functionality from the midi permission check. A subsequent CL will move the common classes to chrome/browser/content_settings/ and implement the midi permission check in terms of these classes. Note that bubbles are not yet implemented so only infobars work now. Note also that only way to rever the permission decision right now is to clear browser settings. BUG=350378 NOTRY=true (note, the mac release bot has been stuck for over an hour in the compile step, all other release builds and all other mac bots are ok) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279437

Patch Set 1 #

Patch Set 2 : #

Total comments: 25

Patch Set 3 : Rebased and addressed Michael's comments #

Total comments: 23

Patch Set 4 : Comments from Peter, Bernhard and Elliot #

Total comments: 56

Patch Set 5 : Comments from jianli,jam,fgorski,pkasting #

Total comments: 10

Patch Set 6 : Last nits from Michael and Takashi #

Patch Set 7 : #

Patch Set 8 : Handle swich case for mac #

Patch Set 9 : Handle content settings switch for mac #

Patch Set 10 : add content settings html sections #

Unified diffs Side-by-side diffs Delta from patch set Stats (+697 lines, -17 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_default_provider.cc View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_utils.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/content_settings/permission_queue_controller.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/content_settings.html View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/content_settings_exceptions_area.html View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/permission_context_base.h View 1 2 3 4 1 chunk +89 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/permission_context_base.cc View 1 2 3 4 1 chunk +111 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/permission_infobar_delegate.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/permission_infobar_delegate.cc View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_infobar_delegate.h View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_infobar_delegate.cc View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_permission_context.h View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_permission_context.cc View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_permission_context_factory.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/push_messaging_permission_context_factory.cc View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/push_messaging_service_impl.h View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/push_messaging_service_impl.cc View 1 2 3 4 5 6 5 chunks +64 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/common/content_settings_types.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/push_messaging_message_filter.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/push_messaging_message_filter.cc View 1 2 3 4 1 chunk +13 lines, -8 lines 0 comments Download
M content/public/browser/push_messaging_service.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (1 generated)
Miguel Garcia
First pass review before adding the different owners. Takashi, my idea would be to refactor ...
6 years, 6 months ago (2014-06-19 00:51:58 UTC) #1
Michael van Ouwerkerk
Nice! You'll need to rebase though as r278087 has possible merge conflicts. https://codereview.chromium.org/343743004/diff/20001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd ...
6 years, 6 months ago (2014-06-19 10:16:11 UTC) #2
Miguel Garcia
PTAL, adding reviewers for the different pieces fgorski: for gcm bauerb: for content settings (jochen ...
6 years, 6 months ago (2014-06-19 17:49:29 UTC) #3
Peter Kasting
I'm not actually a chrome/common/ owner, but here are some minor comments on the infobars. ...
6 years, 6 months ago (2014-06-19 17:58:21 UTC) #4
Elliot Glaysher
https://codereview.chromium.org/343743004/diff/40001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/343743004/diff/40001/chrome/browser/profiles/profile_impl.cc#newcode1036 chrome/browser/profiles/profile_impl.cc:1036: return gcm::GCMPermissionContextFactory::GetForProfile(this); Is there a reason you're adding more ...
6 years, 6 months ago (2014-06-19 18:07:15 UTC) #5
Bernhard Bauer
Content settinsg LGTM with a nit: https://codereview.chromium.org/343743004/diff/40001/chrome/browser/content_settings/permission_queue_controller.cc File chrome/browser/content_settings/permission_queue_controller.cc (right): https://codereview.chromium.org/343743004/diff/40001/chrome/browser/content_settings/permission_queue_controller.cc#newcode122 chrome/browser/content_settings/permission_queue_controller.cc:122: infobar_ = gcm::GCMInfoBarDelegate::Create(GetInfoBarService(id_), ...
6 years, 6 months ago (2014-06-19 18:13:18 UTC) #6
Miguel Garcia
Thanks fall for the quick review! https://codereview.chromium.org/343743004/diff/40001/chrome/browser/content_settings/permission_queue_controller.cc File chrome/browser/content_settings/permission_queue_controller.cc (right): https://codereview.chromium.org/343743004/diff/40001/chrome/browser/content_settings/permission_queue_controller.cc#newcode122 chrome/browser/content_settings/permission_queue_controller.cc:122: infobar_ = gcm::GCMInfoBarDelegate::Create(GetInfoBarService(id_), ...
6 years, 6 months ago (2014-06-19 21:49:22 UTC) #7
Miguel Garcia
+jam for content OWNERS
6 years, 6 months ago (2014-06-19 21:58:37 UTC) #8
Peter Kasting
infobars LGTM with one substantive issue https://codereview.chromium.org/343743004/diff/40001/chrome/browser/services/gcm/gcm_infobar_delegate.h File chrome/browser/services/gcm/gcm_infobar_delegate.h (right): https://codereview.chromium.org/343743004/diff/40001/chrome/browser/services/gcm/gcm_infobar_delegate.h#newcode43 chrome/browser/services/gcm/gcm_infobar_delegate.h:43: } // namespace ...
6 years, 6 months ago (2014-06-19 22:04:32 UTC) #9
Elliot Glaysher
(My lgtm is no longer needed since there aren't any changes to the c/b/p/.)
6 years, 6 months ago (2014-06-19 22:11:40 UTC) #10
fgorski
lgtm, a few nits and questions though. https://codereview.chromium.org/343743004/diff/60001/chrome/browser/services/gcm/gcm_infobar_delegate.cc File chrome/browser/services/gcm/gcm_infobar_delegate.cc (right): https://codereview.chromium.org/343743004/diff/60001/chrome/browser/services/gcm/gcm_infobar_delegate.cc#newcode21 chrome/browser/services/gcm/gcm_infobar_delegate.cc:21: return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( ...
6 years, 6 months ago (2014-06-20 14:14:15 UTC) #11
jam
https://codereview.chromium.org/343743004/diff/60001/content/browser/push_messaging_message_filter.cc File content/browser/push_messaging_message_filter.cc (right): https://codereview.chromium.org/343743004/diff/60001/content/browser/push_messaging_message_filter.cc#newcode42 content/browser/push_messaging_message_filter.cc:42: // by receiving the IPC on the UI thread. ...
6 years, 6 months ago (2014-06-20 15:55:01 UTC) #12
jianli
I am wondering if it is appropriate to put lots of UI related stuff under ...
6 years, 6 months ago (2014-06-20 17:19:30 UTC) #13
Miguel Garcia
Thanks a lot for all the comments >I am wondering if it is appropriate to ...
6 years, 6 months ago (2014-06-20 20:50:13 UTC) #14
jam
content lgtm the sooner this is converted to use frame instead of view, the better, ...
6 years, 6 months ago (2014-06-23 06:53:48 UTC) #15
Takashi Toyoshima
lgtm. defer to owners. https://codereview.chromium.org/343743004/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/343743004/diff/80001/chrome/app/generated_resources.grd#newcode14398 chrome/app/generated_resources.grd:14398: + <!-- Push messaging infobar ...
6 years, 6 months ago (2014-06-23 10:29:16 UTC) #16
Michael van Ouwerkerk
lgtm Thanks for all the changes! https://codereview.chromium.org/343743004/diff/80001/chrome/browser/services/gcm/permission_infobar_delegate.h File chrome/browser/services/gcm/permission_infobar_delegate.h (right): https://codereview.chromium.org/343743004/diff/80001/chrome/browser/services/gcm/permission_infobar_delegate.h#newcode21 chrome/browser/services/gcm/permission_infobar_delegate.h:21: // provide an ...
6 years, 6 months ago (2014-06-23 12:34:10 UTC) #17
Miguel Garcia
https://codereview.chromium.org/343743004/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/343743004/diff/80001/chrome/app/generated_resources.grd#newcode14398 chrome/app/generated_resources.grd:14398: + <!-- Push messaging infobar --> On 2014/06/23 10:29:16, ...
6 years, 6 months ago (2014-06-23 18:23:14 UTC) #18
Miguel Garcia
The CQ bit was checked by miguelg@chromium.org
6 years, 6 months ago (2014-06-23 18:24:13 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miguelg@chromium.org/343743004/100001
6 years, 6 months ago (2014-06-23 18:26:30 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-23 20:30:30 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-23 20:32:32 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/builds/45073)
6 years, 6 months ago (2014-06-23 20:32:34 UTC) #23
Takashi Toyoshima
Ah, you need to handle switch-case for mac and win.
6 years, 6 months ago (2014-06-24 02:18:37 UTC) #24
Miguel Garcia
The CQ bit was checked by miguelg@chromium.org
6 years, 6 months ago (2014-06-24 08:52:40 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miguelg@chromium.org/343743004/160001
6 years, 6 months ago (2014-06-24 08:53:28 UTC) #26
Miguel Garcia
The CQ bit was checked by miguelg@chromium.org
6 years, 6 months ago (2014-06-24 13:11:46 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miguelg@chromium.org/343743004/180001
6 years, 6 months ago (2014-06-24 13:13:04 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-24 16:19:18 UTC) #29
Miguel Garcia
The CQ bit was unchecked by miguelg@chromium.org
6 years, 6 months ago (2014-06-24 17:50:34 UTC) #30
Miguel Garcia
The CQ bit was checked by miguelg@chromium.org
6 years, 6 months ago (2014-06-24 17:50:35 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miguelg@chromium.org/343743004/180001
6 years, 6 months ago (2014-06-24 17:51:41 UTC) #32
commit-bot: I haz the power
6 years, 6 months ago (2014-06-24 17:53:27 UTC) #33
Message was sent while issue was closed.
Change committed as 279437

Powered by Google App Engine
This is Rietveld 408576698