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

Issue 8849010: Add 'web_accessible_resource" keyword for version 2 extension manifests. This makes extension res... (Closed)

Created:
9 years ago by Cris Neckar
Modified:
9 years ago
Reviewers:
Aaron Boodman, mihaip, abarth-chromium
CC:
chromium-reviews, jstritar+watch_chromium.org, hashimoto+watch_chromium.org, aboxhall+watch_chromium.org, Paweł Hajdan Jr., yoshiki+watch_chromium.org, mihaip+watch_chromium.org, yuzo+watch_chromium.org, davidbarr+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, brettw-cc_chromium.org, ctguil+watch_chromium.org, zork+watch_chromium.org
Visibility:
Public.

Description

Add 'web_accessible_resource" keyword for version 2 extension manifests. This makes extension resources web accessible only when explicitly intended. Behavior is unaffected unless an extension specifies a manifest_version of 2 or more. BUG=46002 TEST=ExtensionResourceRequestPolicyTest.WebAccessibleResources Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115401

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 4

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 6

Patch Set 7 : '' #

Total comments: 1

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Total comments: 11

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -5 lines) Patch
M chrome/browser/extensions/extension_resource_request_policy_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +41 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_manifests_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/common/extensions/manifest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/manifest_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/extension_resource_request_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -0 lines 0 comments Download
MM chrome/test/data/devtools/extensions/devtools_extension/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/content_scripts/extension_iframe/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/speech_input/recognition/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/tabs/on_updated/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/webrequest/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -1 line 0 comments Download
A chrome/test/data/extensions/manifest_tests/web_accessible_resources_1.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/manifest_tests/web_accessible_resources_2.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/manifest_tests/web_accessible_resources_3.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/manifest_tests/web_accessible_resources_4.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/nacl_test_injection/buildbot_nacl_integration.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Cris Neckar
I have no idea if I did the unit test anywhere near correctly. Aaron, any ...
9 years ago (2011-12-07 22:47:29 UTC) #1
abarth-chromium
Another approach is to have the web_accessible_resources manifest key work for all extensions but then ...
9 years ago (2011-12-07 22:54:53 UTC) #2
abarth-chromium
http://codereview.chromium.org/8849010/diff/13001/chrome/renderer/extensions/extension_resource_request_policy.cc File chrome/renderer/extensions/extension_resource_request_policy.cc (right): http://codereview.chromium.org/8849010/diff/13001/chrome/renderer/extensions/extension_resource_request_policy.cc#newcode43 chrome/renderer/extensions/extension_resource_request_policy.cc:43: if (extension->manifest_version() < 2 && Do you mean >= ...
9 years ago (2011-12-07 22:55:34 UTC) #3
Cris Neckar
On 2011/12/07 22:54:53, abarth wrote: > Another approach is to have the web_accessible_resources manifest key ...
9 years ago (2011-12-07 23:04:33 UTC) #4
Cris Neckar
That's what I get for shooting from the hip, ignore that last one. If we ...
9 years ago (2011-12-07 23:16:59 UTC) #5
Aaron Boodman
I agree with Adam about making this work if the developer specifies it in v1. ...
9 years ago (2011-12-08 00:37:38 UTC) #6
Aaron Boodman
(and btw, your api test is perfect - thanks for taking the time to make ...
9 years ago (2011-12-08 00:37:57 UTC) #7
Cris Neckar
On 2011/12/08 00:37:57, Aaron Boodman wrote: > (and btw, your api test is perfect - ...
9 years ago (2011-12-08 00:54:14 UTC) #8
Aaron Boodman
On Wed, Dec 7, 2011 at 4:54 PM, <cdn@chromium.org> wrote: > So if I don't ...
9 years ago (2011-12-08 01:04:42 UTC) #9
Cris Neckar
On 2011/12/08 01:04:42, Aaron Boodman wrote: > On Wed, Dec 7, 2011 at 4:54 PM, ...
9 years ago (2011-12-08 01:13:54 UTC) #10
Cris Neckar
On 2011/12/08 01:13:54, Cris Neckar wrote: > On 2011/12/08 01:04:42, Aaron Boodman wrote: > > ...
9 years ago (2011-12-08 23:45:21 UTC) #11
abarth-chromium
http://codereview.chromium.org/8849010/diff/21008/chrome/common/extensions/manifest.cc File chrome/common/extensions/manifest.cc (right): http://codereview.chromium.org/8849010/diff/21008/chrome/common/extensions/manifest.cc#newcode63 chrome/common/extensions/manifest.cc:63: map[keys::kWebAccessibleResources] = all_but_themes; Do hosted apps use this key ...
9 years ago (2011-12-08 23:52:44 UTC) #12
Cris Neckar
http://codereview.chromium.org/8849010/diff/21008/chrome/common/extensions/manifest.cc File chrome/common/extensions/manifest.cc (right): http://codereview.chromium.org/8849010/diff/21008/chrome/common/extensions/manifest.cc#newcode63 chrome/common/extensions/manifest.cc:63: map[keys::kWebAccessibleResources] = all_but_themes; On 2011/12/08 23:52:45, abarth wrote: > ...
9 years ago (2011-12-09 00:06:22 UTC) #13
Cris Neckar
http://codereview.chromium.org/8849010/diff/13001/chrome/renderer/extensions/extension_resource_request_policy.cc File chrome/renderer/extensions/extension_resource_request_policy.cc (right): http://codereview.chromium.org/8849010/diff/13001/chrome/renderer/extensions/extension_resource_request_policy.cc#newcode43 chrome/renderer/extensions/extension_resource_request_policy.cc:43: if (extension->manifest_version() < 2 && On 2011/12/07 22:55:34, abarth ...
9 years ago (2011-12-09 00:13:06 UTC) #14
Aaron Boodman
LGTM One last idea for improvement. No need to wait for another review from me. ...
9 years ago (2011-12-09 15:17:21 UTC) #15
Cris Neckar
If either of you has any idea why this is failing on the trybots I ...
9 years ago (2011-12-16 01:15:28 UTC) #16
mihaip_google.com
I believe that trybots don't handle patches with binary changes well. You should try TBR-ing ...
9 years ago (2011-12-16 01:50:07 UTC) #17
Aaron Boodman
Mihai's right. I thought I told you about that the other day. - a On ...
9 years ago (2011-12-16 04:11:59 UTC) #18
Cris Neckar
Thanks guys, that did the trick.. Unfortunately there is another issue with the nacl tests ...
9 years ago (2011-12-16 23:07:34 UTC) #19
Cris Neckar
Ok I think this is now ready to land. Could I get another sanity check ...
9 years ago (2011-12-20 19:48:45 UTC) #20
Aaron Boodman
LGTM some nits tho http://codereview.chromium.org/8849010/diff/66002/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/8849010/diff/66002/chrome/common/chrome_switches.cc#newcode276 chrome/common/chrome_switches.cc:276: const char kDisableExtensionsResourceWhitelist[] = Perhaps ...
9 years ago (2011-12-20 21:12:58 UTC) #21
Cris Neckar
http://codereview.chromium.org/8849010/diff/66002/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/8849010/diff/66002/chrome/common/chrome_switches.cc#newcode276 chrome/common/chrome_switches.cc:276: const char kDisableExtensionsResourceWhitelist[] = On 2011/12/20 21:12:58, Aaron Boodman ...
9 years ago (2011-12-20 22:00:06 UTC) #22
Aaron Boodman
OK, LGTM
9 years ago (2011-12-20 22:18:16 UTC) #23
Cris Neckar
9 years ago (2011-12-20 22:54:09 UTC) #24
On 2011/12/20 22:18:16, Aaron Boodman wrote:
> OK, LGTM

Thanks I want to wait for the trybots one last time and then I'll land it.

Powered by Google App Engine
This is Rietveld 408576698