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

Issue 2046293002: Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts (Closed)

Created:
4 years, 6 months ago by raymes
Modified:
4 years, 6 months ago
Reviewers:
palmer, Charlie Reis
CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, darin-cc_chromium.org, jam, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@permission-delegation-2-blink
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts DelegationTracker maintains a browser-side mapping of which frames have delegated permissions to other frames. It also allows querying whether a permission has actually been granted to a frame based on permissions that have been delegated in the tree of frames and based on the origins of the frames involved. For each child RenderFrameHost that permissions are set for, an entry is added to a map. That entry is removed when the RenderFrameHost is destroyed or navigated such that permissions will no longer be delegated to it. A MockRenderFrameHost has been introduced to aid testing. BUG=614608 Committed: https://crrev.com/7c1c35a23e257dc27e32827500bf9ca56510df89 Cr-Commit-Position: refs/heads/master@{#401478}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 #

Patch Set 4 #

Total comments: 2

Patch Set 5 : Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts #

Patch Set 6 : Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts #

Total comments: 3

Patch Set 7 : Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -9 lines) Patch
A chrome/browser/permissions/delegation_tracker.h View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/permissions/delegation_tracker.cc View 1 2 3 4 5 6 1 chunk +104 lines, -0 lines 0 comments Download
A chrome/browser/permissions/delegation_tracker_unittest.cc View 1 2 3 4 1 chunk +225 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_manager.h View 1 2 3 4 5 6 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/permissions/permission_manager.cc View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/permissions/permission_util.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_util.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (10 generated)
raymes
4 years, 6 months ago (2016-06-09 05:46:44 UTC) #3
palmer
lgtm https://codereview.chromium.org/2046293002/diff/20001/chrome/browser/permissions/delegation_tracker.cc File chrome/browser/permissions/delegation_tracker.cc (right): https://codereview.chromium.org/2046293002/diff/20001/chrome/browser/permissions/delegation_tracker.cc#newcode38 chrome/browser/permissions/delegation_tracker.cc:38: rfh_destroyed_callback_.Run(render_frame_host); // Will delete "this". Nit: |this|.
4 years, 6 months ago (2016-06-10 19:35:24 UTC) #4
raymes
creis: please let me know if the changes to content/ seem ok to you. Thanks! ...
4 years, 6 months ago (2016-06-16 04:55:54 UTC) #6
Charlie Reis
https://codereview.chromium.org/2046293002/diff/50001/content/public/test/mock_render_frame_host.h File content/public/test/mock_render_frame_host.h (right): https://codereview.chromium.org/2046293002/diff/50001/content/public/test/mock_render_frame_host.h#newcode14 content/public/test/mock_render_frame_host.h:14: class CONTENT_EXPORT MockRenderFrameHost : public RenderFrameHost { We already ...
4 years, 6 months ago (2016-06-16 22:03:05 UTC) #7
raymes
https://codereview.chromium.org/2046293002/diff/50001/content/public/test/mock_render_frame_host.h File content/public/test/mock_render_frame_host.h (right): https://codereview.chromium.org/2046293002/diff/50001/content/public/test/mock_render_frame_host.h#newcode14 content/public/test/mock_render_frame_host.h:14: class CONTENT_EXPORT MockRenderFrameHost : public RenderFrameHost { On 2016/06/16 ...
4 years, 6 months ago (2016-06-20 06:35:48 UTC) #8
Charlie Reis
Great! One other note on PermissionTypeHash below (sorry for not noticing it before). https://codereview.chromium.org/2046293002/diff/90001/content/public/browser/permission_type.h File ...
4 years, 6 months ago (2016-06-20 21:34:21 UTC) #9
raymes
Thanks! I moved it back into chrome/ https://codereview.chromium.org/2046293002/diff/90001/content/public/browser/permission_type.h File content/public/browser/permission_type.h (right): https://codereview.chromium.org/2046293002/diff/90001/content/public/browser/permission_type.h#newcode31 content/public/browser/permission_type.h:31: struct PermissionTypeHash ...
4 years, 6 months ago (2016-06-22 03:48:11 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046293002/130001
4 years, 6 months ago (2016-06-22 03:48:12 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-22 04:30:11 UTC) #15
Charlie Reis
Thanks! content/ LGTM.
4 years, 6 months ago (2016-06-22 16:11:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046293002/130001
4 years, 6 months ago (2016-06-23 00:15:26 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:130001)
4 years, 6 months ago (2016-06-23 00:21:14 UTC) #21
commit-bot: I haz the power
4 years, 6 months ago (2016-06-23 00:22:50 UTC) #23
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7c1c35a23e257dc27e32827500bf9ca56510df89
Cr-Commit-Position: refs/heads/master@{#401478}

Powered by Google App Engine
This is Rietveld 408576698