|
Resubmit: Block content scripts from executing until user grants permission
Original CL: https://codereview.chromium.org/288053002/
Original Description:
Prevent extensions with <all_urls> from running content scripts without user
consent if the scripts-require-action switch is on.
-----------------------------------------------
This had a problem in that when user scripts are updated, the old versions
are invalidated (as they rely on StringPieces, which do not actually own
content). Fix is to update all user scripts, even if they didn't actually
change.
Also add in ActiveScriptController removing actions for unloaded extensions.
TBR=jschuh@chromium.org (for extension_messages.h, no change from original patch)
BUG= 362353
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274659
Total comments: 4
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+654 lines, -122 lines) |
Patch |
 |
M |
chrome/browser/chrome_content_browser_client.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/active_script_controller.h
|
View
|
1
2
3
|
3 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/active_script_controller.cc
|
View
|
1
2
3
|
4 chunks |
+43 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/active_script_controller_browsertest.cc
|
View
|
1
2
3
|
7 chunks |
+114 lines, -24 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/location_bar_controller.h
|
View
|
1
2
3
|
5 chunks |
+20 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/location_bar_controller.cc
|
View
|
1
2
3
|
2 chunks |
+22 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/page_action_controller.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/user_script_master.h
|
View
|
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/user_script_master.cc
|
View
|
|
6 chunks |
+19 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
|
View
|
1
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc
|
View
|
1
2
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/common/extension_messages.h
|
View
|
1
2
3
4
|
2 chunks |
+19 lines, -4 lines |
0 comments
|
Download
|
 |
M |
extensions/common/permissions/permissions_data.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
extensions/common/user_script.h
|
View
|
1
|
4 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/common/user_script.cc
|
View
|
1
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/common/user_script_unittest.cc
|
View
|
1
2
|
3 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.cc
|
View
|
1
2
3
4
|
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
|
|
3 chunks |
+10 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_injection.h
|
View
|
1
2
|
6 chunks |
+48 lines, -11 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_injection.cc
|
View
|
1
|
4 chunks |
+155 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/user_script_slave.h
|
View
|
|
2 chunks |
+13 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/user_script_slave.cc
|
View
|
1
2
|
6 chunks |
+104 lines, -46 lines |
0 comments
|
Download
|
Total messages: 10 (0 generated)
|