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

Issue 286003004: Block tabs.executeScript() from executing until user grants permission (Closed)

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

Description

Block tabs.executeScript() from executing until user grants permission Prevent extensions with <all_urls> from executing scripts using executeScript() without user consent if the scripts-require-action switch is on. Coming up next: Content scripts. BUG=362353 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271528

Patch Set 1 : #

Total comments: 42

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Total comments: 17

Patch Set 4 : #

Total comments: 11

Patch Set 5 : Nits and add histograms #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : Epic master rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -156 lines) Patch
M chrome/browser/extensions/active_script_controller.h View 1 2 3 4 5 6 4 chunks +37 lines, -12 lines 0 comments Download
M chrome/browser/extensions/active_script_controller.cc View 1 2 3 4 5 6 6 chunks +117 lines, -32 lines 0 comments Download
M chrome/browser/extensions/active_script_controller_browsertest.cc View 1 2 3 4 3 chunks +269 lines, -35 lines 0 comments Download
M chrome/browser/extensions/script_executor.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/script_executor.cc View 1 2 3 4 5 6 3 chunks +55 lines, -22 lines 0 comments Download
M chrome/test/data/extensions/active_script/content_scripts_all_hosts/content_script.js View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/test/data/extensions/active_script/content_scripts_all_hosts/manifest.json View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/test/data/extensions/active_script/content_scripts_explicit_hosts/content_script.js View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/test/data/extensions/active_script/content_scripts_explicit_hosts/manifest.json View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/test/data/extensions/active_script/inject_scripts_all_hosts/background.js View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
D chrome/test/data/extensions/active_script/inject_scripts_all_hosts/manifest.json View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Devlin
6 years, 7 months ago (2014-05-14 21:04:59 UTC) #1
not at google - send to devlin
For testing, have a look at extension_messages_apitest.cc... or at least, the externally connectable ones. They ...
6 years, 7 months ago (2014-05-15 00:12:36 UTC) #2
Devlin
Re generating the test extensions... certainly could, and I have no preference (I think the ...
6 years, 7 months ago (2014-05-15 17:45:59 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/286003004/diff/20001/chrome/browser/extensions/active_script_controller.h File chrome/browser/extensions/active_script_controller.h (right): https://codereview.chromium.org/286003004/diff/20001/chrome/browser/extensions/active_script_controller.h#newcode58 chrome/browser/extensions/active_script_controller.h:58: scoped_ptr<const base::Closure> callback); On 2014/05/15 17:45:59, D Cronin wrote: ...
6 years, 7 months ago (2014-05-15 18:19:56 UTC) #4
not at google - send to devlin
lunch, then look again. https://codereview.chromium.org/286003004/diff/20001/chrome/browser/extensions/active_script_controller_browsertest.cc File chrome/browser/extensions/active_script_controller_browsertest.cc (right): https://codereview.chromium.org/286003004/diff/20001/chrome/browser/extensions/active_script_controller_browsertest.cc#newcode104 chrome/browser/extensions/active_script_controller_browsertest.cc:104: // however, since they are ...
6 years, 7 months ago (2014-05-15 18:26:55 UTC) #5
not at google - send to devlin
phew ok. I think we're close. to answer your question about testing: I think that ...
6 years, 7 months ago (2014-05-15 22:21:44 UTC) #6
Devlin
Re tests: Neither of the utils really made anything nicer, but it's not quite as ...
6 years, 7 months ago (2014-05-15 23:52:35 UTC) #7
not at google - send to devlin
lgtm with some more uma comments. https://codereview.chromium.org/286003004/diff/60001/chrome/browser/extensions/active_script_controller.cc File chrome/browser/extensions/active_script_controller.cc (right): https://codereview.chromium.org/286003004/diff/60001/chrome/browser/extensions/active_script_controller.cc#newcode188 chrome/browser/extensions/active_script_controller.cc:188: PendingRequestList* list = ...
6 years, 7 months ago (2014-05-16 00:08:32 UTC) #8
Devlin
https://codereview.chromium.org/286003004/diff/80001/chrome/browser/extensions/active_script_controller.cc File chrome/browser/extensions/active_script_controller.cc (right): https://codereview.chromium.org/286003004/diff/80001/chrome/browser/extensions/active_script_controller.cc#newcode70 chrome/browser/extensions/active_script_controller.cc:70: if (PermissionsData::RequiresActionForScriptExecution(extension)) { On 2014/05/16 00:08:33, kalman wrote: > ...
6 years, 7 months ago (2014-05-16 16:13:46 UTC) #9
Devlin
Ben, please take a quick look at the (small) changes to ASC and ScriptExecutor. Ilya, ...
6 years, 7 months ago (2014-05-16 17:18:52 UTC) #10
not at google - send to devlin
lgtm https://codereview.chromium.org/286003004/diff/120001/chrome/browser/extensions/active_script_controller.cc File chrome/browser/extensions/active_script_controller.cc (right): https://codereview.chromium.org/286003004/diff/120001/chrome/browser/extensions/active_script_controller.cc#newcode80 chrome/browser/extensions/active_script_controller.cc:80: // run scripts. this comment looks misplaced https://codereview.chromium.org/286003004/diff/120001/chrome/browser/extensions/active_script_controller.h ...
6 years, 7 months ago (2014-05-16 17:32:12 UTC) #11
Ilya Sherman
Histograms LGTM
6 years, 7 months ago (2014-05-16 21:36:56 UTC) #12
Devlin
https://codereview.chromium.org/286003004/diff/120001/chrome/browser/extensions/active_script_controller.cc File chrome/browser/extensions/active_script_controller.cc (right): https://codereview.chromium.org/286003004/diff/120001/chrome/browser/extensions/active_script_controller.cc#newcode80 chrome/browser/extensions/active_script_controller.cc:80: // run scripts. On 2014/05/16 17:32:12, kalman wrote: > ...
6 years, 7 months ago (2014-05-19 16:17:45 UTC) #13
Devlin
The CQ bit was checked by rdevlin.cronin@chromium.org
6 years, 7 months ago (2014-05-19 16:17:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdevlin.cronin@chromium.org/286003004/160001
6 years, 7 months ago (2014-05-19 16:18:04 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-19 22:53:42 UTC) #16
commit-bot: I haz the power
6 years, 7 months ago (2014-05-20 01:11:32 UTC) #17
Message was sent while issue was closed.
Change committed as 271528

Powered by Google App Engine
This is Rietveld 408576698