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

Issue 769103002: Refactor ProtectedMediaIdentifierPermissionContext to derive from PermissionContextBase. (Closed)

Created:
6 years ago by timvolodine
Modified:
6 years ago
CC:
mlamouri (slow - plz ping), chromium-reviews, feature-media-reviews_chromium.org, mcasas+watch_chromium.org, posciak+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactor ProtectedMediaIdentifierPermissionContext to derive from PermissionContextBase. Refactoring of ProtectedMediaIdentifierPermissionContext to derive from PermissionContextBase class to conform with other APIs like geolocation and midi. This has the advantage of less code and a consistent path for all permissions. Also it makes it easier to implement PermissionService because some functionality like HasPermission() can be implemented at the level of PermissionContextBase. Also add the corresponding UMA bits in histograms.xml and permission_context_uma_util.cc. BUG= Committed: https://crrev.com/1baa38863fad853087e411af1fff950ba16cf5de Cr-Commit-Position: refs/heads/master@{#308100}

Patch Set 1 #

Patch Set 2 : cleanup and fix compile #

Total comments: 10

Patch Set 3 : apply comments, fix compile #

Total comments: 14

Patch Set 4 : address Miguel's comments add UMA #

Patch Set 5 : add #ifdef OS_CHROMEOS and clean-up includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -251 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/content_settings/permission_context_base.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/permission_context_base.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/permission_context_uma_util.cc View 1 2 3 4 2 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/media/protected_media_identifier_permission_context.h View 1 2 3 2 chunks +13 lines, -70 lines 0 comments Download
M chrome/browser/media/protected_media_identifier_permission_context.cc View 1 2 3 4 4 chunks +26 lines, -145 lines 0 comments Download
M chrome/browser/media/protected_media_identifier_permission_context_factory.cc View 1 2 2 chunks +4 lines, -28 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (7 generated)
timvolodine
6 years ago (2014-12-02 18:30:47 UTC) #2
timvolodine
6 years ago (2014-12-02 18:32:56 UTC) #3
Kibeom Kim (inactive)
LGTM thanks for cleaning up this!
6 years ago (2014-12-02 21:19:14 UTC) #4
mlamouri (slow - plz ping)
That looks great! I have a couple of comments below. Mostly nits except for the ...
6 years ago (2014-12-02 22:43:30 UTC) #6
timvolodine
looks even slimmer now :) https://codereview.chromium.org/769103002/diff/20001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/769103002/diff/20001/chrome/browser/chrome_content_browser_client.cc#newcode1956 chrome/browser/chrome_content_browser_client.cc:1956: ->RequestPermission(web_contents, On 2014/12/02 22:43:30, ...
6 years ago (2014-12-03 16:44:25 UTC) #7
mlamouri (slow - plz ping)
lgtm, thanks! :)
6 years ago (2014-12-03 16:52:55 UTC) #8
timvolodine
+ thakis@ as chrome/ owner
6 years ago (2014-12-03 16:59:45 UTC) #10
Nico
lgtm
6 years ago (2014-12-03 18:42:28 UTC) #11
Miguel Garcia
Looks really good, some questions and nits below. https://codereview.chromium.org/769103002/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/769103002/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode44 chrome/browser/content_settings/permission_context_uma_util.cc:44: void ...
6 years ago (2014-12-03 18:57:37 UTC) #12
timvolodine
https://codereview.chromium.org/769103002/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/769103002/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode44 chrome/browser/content_settings/permission_context_uma_util.cc:44: void RecordPermissionAction( On 2014/12/03 18:57:36, Miguel Garcia wrote: > ...
6 years ago (2014-12-04 17:22:26 UTC) #13
timvolodine
more updates from talking to qinmin@: https://codereview.chromium.org/769103002/diff/40001/chrome/browser/media/protected_media_identifier_permission_context.cc File chrome/browser/media/protected_media_identifier_permission_context.cc (left): https://codereview.chromium.org/769103002/diff/40001/chrome/browser/media/protected_media_identifier_permission_context.cc#oldcode62 chrome/browser/media/protected_media_identifier_permission_context.cc:62: #if defined(ENABLE_EXTENSIONS) On ...
6 years ago (2014-12-04 17:24:39 UTC) #14
timvolodine
+isherman@ : for histograms.xml
6 years ago (2014-12-04 17:40:07 UTC) #16
Kibeom Kim (inactive)
Yes right, ChromeOS also has it, so I think we want to remove #if defined(OS_ANDROID) ...
6 years ago (2014-12-04 18:35:35 UTC) #17
Kibeom Kim (inactive)
6 years ago (2014-12-04 18:35:49 UTC) #19
Jun Mukai
On 2014/12/04 18:35:35, Kibeom Kim wrote: > Yes right, ChromeOS also has it, so I ...
6 years ago (2014-12-04 18:52:40 UTC) #21
Jun Mukai
On 2014/12/04 18:52:40, Jun Mukai wrote: > On 2014/12/04 18:35:35, Kibeom Kim wrote: > > ...
6 years ago (2014-12-04 18:55:32 UTC) #22
Darren Krahn
On 2014/12/04 18:55:32, Jun Mukai wrote: > On 2014/12/04 18:52:40, Jun Mukai wrote: > > ...
6 years ago (2014-12-04 19:02:34 UTC) #23
Ilya Sherman
histograms.xml lgtm
6 years ago (2014-12-04 19:26:04 UTC) #24
timvolodine
thanks for the comments everybody, I've added #if defined(OS_CHROMEOS) to be consistent with the definition ...
6 years ago (2014-12-12 15:32:07 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/769103002/80001
6 years ago (2014-12-12 15:33:07 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-12-12 16:33:27 UTC) #28
commit-bot: I haz the power
6 years ago (2014-12-12 16:34:15 UTC) #29
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/1baa38863fad853087e411af1fff950ba16cf5de
Cr-Commit-Position: refs/heads/master@{#308100}

Powered by Google App Engine
This is Rietveld 408576698