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

Issue 2713083003: Use ContentSetting in chrome/ instead of PermissionStatus (Closed)

Created:
3 years, 10 months ago by Timothy Loh
Modified:
3 years, 9 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, mcasas+watch+vc_chromium.org, mlamouri+watch-geolocation_chromium.org, Peter Beverloo, chfremer+watch_chromium.org, mlamouri+watch-notifications_chromium.org, jam, raymes+watch_chromium.org, dkrahn+watch_chromium.org, feature-media-reviews_chromium.org, oshima+watch_chromium.org, Michael van Ouwerkerk, mlamouri+watch-permissions_chromium.org, chromium-apps-reviews_chromium.org, harkness+watch_chromium.org, johnme+watch_chromium.org, davemoore+watch_chromium.org, awdf+watch_chromium.org, chrome-apps-syd-reviews_chromium.org, tommycli, xhwang, lfg, Devlin, Mattias Nissler (ping if slow)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use ContentSetting in chrome/ instead of PermissionStatus This patch updates the PermissionManager so that it's methods exposed to chrome/ use ContentSetting instead of PermissionStatus. This is to avoid ContentSetting values being converted to PermissionStatus values and back again, and makes it clearer which type should be used in chrome/. The GetPermissionStatus is changed to return a PermissionResult instead of a PermissionStatus. This will allow us to, for example, surface denial reasons in website settings. BUG=689799 TBR=peter,tommycli,xhwang,lfg,devlin,mnissler Review-Url: https://codereview.chromium.org/2713083003 Cr-Commit-Position: refs/heads/master@{#453855} Committed: https://chromium.googlesource.com/chromium/src/+/c6911808d9c3d3abbbc59829a63459c63d1645dc

Patch Set 1 #

Patch Set 2 : clean up #

Patch Set 3 : fix cros? #

Patch Set 4 : fix mac? #

Patch Set 5 : really fix build? #

Total comments: 8

Patch Set 6 : address comments #

Patch Set 7 : return permissionresult #

Patch Set 8 : fix compile hopefully #

Total comments: 4

Patch Set 9 : maybe fix android compile + address comments + basic tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -160 lines) Patch
M chrome/browser/chromeos/attestation/platform_verification_flow.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/service_worker_apitest.cc View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/media/webrtc/media_permission.cc View 1 2 3 4 5 6 1 chunk +8 lines, -15 lines 0 comments Download
M chrome/browser/notifications/message_center_settings_controller_unittest.cc View 1 2 3 4 5 6 4 chunks +31 lines, -18 lines 0 comments Download
M chrome/browser/notifications/notification_permission_context_unittest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/notifications/notifier_state_tracker.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 4 5 6 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_interactive_uitest.cc View 1 2 3 4 5 6 7 4 chunks +24 lines, -16 lines 0 comments Download
M chrome/browser/permissions/permission_manager.h View 1 2 3 4 5 6 4 chunks +15 lines, -18 lines 0 comments Download
M chrome/browser/permissions/permission_manager.cc View 1 2 3 4 5 6 7 8 20 chunks +80 lines, -59 lines 0 comments Download
M chrome/browser/permissions/permission_manager_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +55 lines, -0 lines 0 comments Download
M chrome/browser/plugins/flash_download_interception.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/push_messaging/push_messaging_service_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/push_messaging/push_messaging_service_impl.cc View 1 2 3 4 5 6 5 chunks +16 lines, -10 lines 0 comments Download

Messages

Total messages: 63 (50 generated)
Timothy Loh
I left the function name GetPermissionStatus unchanged because as we've discussed before because it doesn't ...
3 years, 9 months ago (2017-02-27 05:44:18 UTC) #21
raymes
https://codereview.chromium.org/2713083003/diff/80001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc File chrome/browser/geolocation/geolocation_permission_context_unittest.cc (right): https://codereview.chromium.org/2713083003/diff/80001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc#newcode915 chrome/browser/geolocation/geolocation_permission_context_unittest.cc:915: ASSERT_EQ(CONTENT_SETTING_ALLOW, This changed to allow? I wonder why tests ...
3 years, 9 months ago (2017-02-28 01:37:34 UTC) #24
Timothy Loh
https://codereview.chromium.org/2713083003/diff/80001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc File chrome/browser/geolocation/geolocation_permission_context_unittest.cc (right): https://codereview.chromium.org/2713083003/diff/80001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc#newcode915 chrome/browser/geolocation/geolocation_permission_context_unittest.cc:915: ASSERT_EQ(CONTENT_SETTING_ALLOW, On 2017/02/28 01:37:34, raymes wrote: > This changed ...
3 years, 9 months ago (2017-02-28 04:02:47 UTC) #32
raymes
lgtm
3 years, 9 months ago (2017-02-28 06:00:32 UTC) #35
Timothy Loh
On 2017/02/28 06:00:32, raymes wrote: > lgtm Dom suggested returning PermissionResult from GetPermissionStatus instead, the ...
3 years, 9 months ago (2017-02-28 08:08:42 UTC) #43
raymes
lg but I think we should add tests for the new functions in PermissionManager. In ...
3 years, 9 months ago (2017-03-01 01:25:03 UTC) #46
Timothy Loh
I added some super basic tests in permission_manager_unittests for GetPermissionStatus(ContentSettingsType, ..), but not any for ...
3 years, 9 months ago (2017-03-01 04:08:55 UTC) #47
raymes
lgtm. I don't think we need to add extra tests to PermissionManager for now for ...
3 years, 9 months ago (2017-03-01 04:27:43 UTC) #48
Timothy Loh
TBRing several people for OWNERS: mnissler: chrome/browser/chromeos/attestation devlin: chrome/browser/extensions lfg: chrome/browser/guest_view xhwang: chrome/browser/media tommycli: chrome/browser/plugins/flash_* ...
3 years, 9 months ago (2017-03-01 05:32:36 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2713083003/200001
3 years, 9 months ago (2017-03-01 05:33:04 UTC) #57
commit-bot: I haz the power
Committed patchset #9 (id:200001) as https://chromium.googlesource.com/chromium/src/+/c6911808d9c3d3abbbc59829a63459c63d1645dc
3 years, 9 months ago (2017-03-01 05:38:28 UTC) #60
Devlin
extensions lgtm
3 years, 9 months ago (2017-03-01 15:16:01 UTC) #62
Peter Beverloo
3 years, 9 months ago (2017-03-07 16:31:45 UTC) #63
Message was sent while issue was closed.
push and notifications lgtm. This does lead to quite some ugly-ish indented
code..

Powered by Google App Engine
This is Rietveld 408576698