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

Issue 288053002: Block content scripts from executing until user grants permission (Closed)

Created:
6 years, 7 months ago by Devlin
Modified:
6 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Block content scripts from executing until user grants permission Prevent extensions with <all_urls> from running content scripts without user consent if the scripts-require-action switch is on. BUG=362353 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273866

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rebase after ScriptInjection refactor #

Total comments: 37

Patch Set 3 : Ben's #

Total comments: 2

Patch Set 4 : #

Patch Set 5 : Fixed test failures #

Total comments: 3

Patch Set 6 : Rebase + check enabled on renderer side #

Patch Set 7 : Pass switch along, too #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : Test for flag off #

Patch Set 10 : Latest master #

Patch Set 11 : CQ Time! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -99 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/active_script_controller.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/extensions/active_script_controller.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +37 lines, -10 lines 0 comments Download
M chrome/browser/extensions/active_script_controller_browsertest.cc View 1 2 3 4 5 6 7 8 7 chunks +55 lines, -10 lines 0 comments Download
M chrome/browser/extensions/user_script_master.h View 1 2 2 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 1 2 6 chunks +19 lines, -7 lines 0 comments Download
M extensions/common/extension_messages.h View 1 2 3 4 5 6 7 2 chunks +19 lines, -4 lines 0 comments Download
M extensions/common/permissions/permissions_data.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M extensions/common/user_script.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/dispatcher.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -3 lines 0 comments Download
M extensions/renderer/extension_helper.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/extension_helper.cc View 1 2 3 chunks +10 lines, -1 line 0 comments Download
M extensions/renderer/script_injection.h View 1 2 5 chunks +43 lines, -8 lines 0 comments Download
M extensions/renderer/script_injection.cc View 1 2 3 4 5 6 7 8 4 chunks +151 lines, -0 lines 0 comments Download
M extensions/renderer/user_script_slave.h View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M extensions/renderer/user_script_slave.cc View 1 2 3 4 5 6 chunks +88 lines, -45 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Devlin
This follows https://codereview.chromium.org/286003004/. No rush.
6 years, 7 months ago (2014-05-14 22:36:29 UTC) #1
not at google - send to devlin
That UserScriptSlave change is pretty epic. It would be great if you could do the ...
6 years, 7 months ago (2014-05-15 00:31:54 UTC) #2
Devlin
The requested refactor was committed in https://codereview.chromium.org/284153006/, so we can revisit this one now. https://codereview.chromium.org/288053002/diff/1/chrome/browser/extensions/active_script_controller_browsertest.cc ...
6 years, 7 months ago (2014-05-20 16:48:09 UTC) #3
not at google - send to devlin
sweet. I'm surprised the were so few changes to the test though... https://codereview.chromium.org/288053002/diff/30001/chrome/browser/extensions/user_script_master.cc File chrome/browser/extensions/user_script_master.cc ...
6 years, 7 months ago (2014-05-21 15:01:06 UTC) #4
Devlin
On 2014/05/21 15:01:06, kalman wrote: > sweet. > > I'm surprised the were so few ...
6 years, 7 months ago (2014-05-21 17:05:11 UTC) #5
not at google - send to devlin
lgtm https://codereview.chromium.org/288053002/diff/30001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/288053002/diff/30001/extensions/renderer/script_injection.cc#newcode72 extensions/renderer/script_injection.cc:72: int64 id; On 2014/05/21 17:05:11, Devlin wrote: > ...
6 years, 7 months ago (2014-05-21 17:36:22 UTC) #6
Devlin
https://codereview.chromium.org/288053002/diff/30001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/288053002/diff/30001/extensions/renderer/script_injection.cc#newcode158 extensions/renderer/script_injection.cc:158: if (!render_view) On 2014/05/21 17:36:23, kalman wrote: > On ...
6 years, 7 months ago (2014-05-21 18:28:27 UTC) #7
Devlin
Justin, can you take a look at extension_messages.h?
6 years, 7 months ago (2014-05-21 18:28:46 UTC) #8
Devlin
On 2014/05/21 18:28:46, Devlin wrote: > Justin, can you take a look at extension_messages.h? Justin, ...
6 years, 7 months ago (2014-05-23 16:13:29 UTC) #9
not at google - send to devlin
https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc#newcode140 extensions/renderer/script_injection.cc:140: if (PermissionsData::RequiresActionForScriptExecution(extension) && as noted over chat, we also ...
6 years, 7 months ago (2014-05-23 18:05:43 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc#newcode140 extensions/renderer/script_injection.cc:140: if (PermissionsData::RequiresActionForScriptExecution(extension) && On 2014/05/23 18:05:43, kalman wrote: > ...
6 years, 7 months ago (2014-05-23 18:06:55 UTC) #11
Devlin
https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc File extensions/renderer/script_injection.cc (right): https://codereview.chromium.org/288053002/diff/90001/extensions/renderer/script_injection.cc#newcode140 extensions/renderer/script_injection.cc:140: if (PermissionsData::RequiresActionForScriptExecution(extension) && On 2014/05/23 18:05:43, kalman wrote: > ...
6 years, 7 months ago (2014-05-23 19:19:46 UTC) #12
not at google - send to devlin
lgtm though pls add a test for the flag being off. https://codereview.chromium.org/288053002/diff/160001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): ...
6 years, 7 months ago (2014-05-23 21:22:26 UTC) #13
Devlin
And test added https://codereview.chromium.org/288053002/diff/160001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/288053002/diff/160001/chrome/browser/chrome_content_browser_client.cc#newcode1641 chrome/browser/chrome_content_browser_client.cc:1641: extensions::switches::kEnableScriptsRequireAction, On 2014/05/23 21:22:26, kalman wrote: ...
6 years, 7 months ago (2014-05-23 21:49:51 UTC) #14
Devlin
Justin, friendly ping?
6 years, 7 months ago (2014-05-27 20:35:38 UTC) #15
jschuh
On 2014/05/27 20:35:38, Devlin wrote: > Justin, friendly ping? Sorry, I was OOO today and ...
6 years, 7 months ago (2014-05-28 00:51:33 UTC) #16
jschuh
IPC security lgtm. (Notes: Adding opaque strings as extension IDs and an integer request ID. ...
6 years, 6 months ago (2014-05-28 22:26:09 UTC) #17
Devlin
The CQ bit was checked by rdevlin.cronin@chromium.org
6 years, 6 months ago (2014-05-29 22:00:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdevlin.cronin@chromium.org/288053002/240001
6 years, 6 months ago (2014-05-29 22:01:59 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 02:24:21 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-30 04:58:58 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/21437)
6 years, 6 months ago (2014-05-30 04:58:58 UTC) #22
Devlin
The CQ bit was checked by rdevlin.cronin@chromium.org
6 years, 6 months ago (2014-05-30 15:26:32 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdevlin.cronin@chromium.org/288053002/240001
6 years, 6 months ago (2014-05-30 15:28:08 UTC) #24
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 17:45:17 UTC) #25
Message was sent while issue was closed.
Change committed as 273866

Powered by Google App Engine
This is Rietveld 408576698