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

Issue 1150683007: [Extensions] Use document url (not top url) for tab-specific permissions (Closed)

Created:
5 years, 6 months ago by Devlin
Modified:
5 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Use document url (not top url) for tab-specific permissions Fix a bug where activeTab would grant script access to all frames in a tab, instead of just the top one. Also remove the top_document_url parameter from CanAccessPage and similar methods. BUG=495883 Committed: https://crrev.com/f994d1efce89b17cf3443ee5a7750e805b44a0e9 Cr-Commit-Position: refs/heads/master@{#332710}

Patch Set 1 : #

Patch Set 2 : Latest master #

Patch Set 3 : Fix extension page content scripts #

Total comments: 15

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -131 lines) Patch
M chrome/browser/extensions/active_script_controller.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/active_tab_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_internal_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/debugger/debugger_api.cc View 3 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 4 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/browser_permissions_policy_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/browser_permissions_policy_delegate.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 chunk +12 lines, -12 lines 0 comments Download
M chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/extensions/permissions/permissions_data_unittest.cc View 16 chunks +36 lines, -45 lines 0 comments Download
M chrome/renderer/extensions/renderer_permissions_policy_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/extensions/renderer_permissions_policy_delegate.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M extensions/browser/extension_web_contents_observer.cc View 1 2 1 chunk +12 lines, -3 lines 0 comments Download
M extensions/common/extension_messages.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/common/permissions/permissions_data.h View 7 chunks +0 lines, -7 lines 0 comments Download
M extensions/common/permissions/permissions_data.cc View 8 chunks +5 lines, -15 lines 0 comments Download
M extensions/renderer/extension_frame_helper.h View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M extensions/renderer/extension_frame_helper.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M extensions/renderer/extension_injection_host.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/extension_injection_host.cc View 1 2 3 5 chunks +12 lines, -4 lines 0 comments Download
M extensions/renderer/injection_host.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M extensions/renderer/programmatic_script_injector.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/programmatic_script_injector.cc View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M extensions/renderer/script_injection.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/script_injector.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/user_script_injector.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/user_script_injector.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M extensions/renderer/user_script_set.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M extensions/renderer/web_ui_injection_host.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/web_ui_injection_host.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 29 (10 generated)
Devlin
Die, top url, die!
5 years, 6 months ago (2015-06-03 00:15:16 UTC) #4
not at google - send to devlin
lgtm
5 years, 6 months ago (2015-06-03 00:52:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150683007/40001
5 years, 6 months ago (2015-06-03 00:57:26 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/63506)
5 years, 6 months ago (2015-06-03 02:08:10 UTC) #10
Devlin
So, turns out we used that top url for something... Namely, we used it to ...
5 years, 6 months ago (2015-06-03 17:45:03 UTC) #11
not at google - send to devlin
lgtm, the comments are easy enough to address - but you may want to wait ...
5 years, 6 months ago (2015-06-03 20:15:45 UTC) #13
Devlin
https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc File extensions/browser/extension_web_contents_observer.cc (right): https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc#newcode156 extensions/browser/extension_web_contents_observer.cc:156: new_host->Send(new ExtensionMsg_SetTabExtensionOwner( On 2015/06/03 20:15:44, kalman wrote: > creis/nasko ...
5 years, 6 months ago (2015-06-03 20:28:47 UTC) #14
nasko
Voiced an opinion. Also looked around in general and you get a bonus IPC LGTM ...
5 years, 6 months ago (2015-06-03 20:31:57 UTC) #15
Devlin
https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc File extensions/browser/extension_web_contents_observer.cc (right): https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc#newcode156 extensions/browser/extension_web_contents_observer.cc:156: new_host->Send(new ExtensionMsg_SetTabExtensionOwner( On 2015/06/03 20:31:56, nasko wrote: > On ...
5 years, 6 months ago (2015-06-03 21:07:43 UTC) #16
Charlie Reis
https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc File extensions/browser/extension_web_contents_observer.cc (right): https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc#newcode156 extensions/browser/extension_web_contents_observer.cc:156: new_host->Send(new ExtensionMsg_SetTabExtensionOwner( On 2015/06/03 21:07:42, Devlin wrote: > On ...
5 years, 6 months ago (2015-06-03 21:12:04 UTC) #17
Devlin
https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc File extensions/browser/extension_web_contents_observer.cc (right): https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc#newcode156 extensions/browser/extension_web_contents_observer.cc:156: new_host->Send(new ExtensionMsg_SetTabExtensionOwner( On 2015/06/03 21:12:03, Charlie Reis wrote: > ...
5 years, 6 months ago (2015-06-03 21:23:51 UTC) #18
Charlie Reis
[+alexmos] https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc File extensions/browser/extension_web_contents_observer.cc (right): https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc#newcode156 extensions/browser/extension_web_contents_observer.cc:156: new_host->Send(new ExtensionMsg_SetTabExtensionOwner( On 2015/06/03 21:23:51, Devlin wrote: > ...
5 years, 6 months ago (2015-06-03 21:34:43 UTC) #20
Devlin
On 2015/06/03 21:34:43, Charlie Reis wrote: > [+alexmos] > > https://codereview.chromium.org/1150683007/diff/60001/extensions/browser/extension_web_contents_observer.cc > File extensions/browser/extension_web_contents_observer.cc (right): ...
5 years, 6 months ago (2015-06-03 21:53:14 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150683007/80001
5 years, 6 months ago (2015-06-03 21:53:55 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 6 months ago (2015-06-03 22:28:25 UTC) #25
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/f994d1efce89b17cf3443ee5a7750e805b44a0e9 Cr-Commit-Position: refs/heads/master@{#332710}
5 years, 6 months ago (2015-06-03 22:29:13 UTC) #26
alexmos
lgtm Follow-up question. There's another use of the top frame's URL in extensions/renderer/script_injection_manager.cc that remains ...
5 years, 6 months ago (2015-06-04 20:27:54 UTC) #27
alexmos
On 2015/06/04 20:27:54, alexmos wrote: > lgtm > > Follow-up question. There's another use of ...
5 years, 6 months ago (2015-06-04 20:28:47 UTC) #28
Devlin
5 years, 6 months ago (2015-06-04 20:29:56 UTC) #29
Message was sent while issue was closed.
On 2015/06/04 20:27:54, alexmos wrote:
> lgtm
> 
> Follow-up question.  There's another use of the top frame's URL in
> extensions/renderer/script_injection_manager.cc that remains after this CL:
>
https://code.google.com/p/chromium/codesearch#chromium/src/extensions/rendere...

Yep, it's on my list. :)  (That one's a pretty easy fix, luckily.)

Powered by Google App Engine
This is Rietveld 408576698