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

Issue 12792005: Allow extensions on chrome:// URLs, when flag is set and permission is explicitly requested (Closed)

Created:
7 years, 9 months ago by aboxhall
Modified:
7 years, 9 months ago
Reviewers:
dmazzoni, Matt Perry, sky
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Allow extensions on chrome:// URLs, when flag is set and permission is explicitly requested in the manifest. BUG=174183 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189586

Patch Set 1 #

Patch Set 2 : Working but wrongly allows extensions which have <all_urls> on chrome:// pages. Also removed a bunc… #

Patch Set 3 : Not yet passing all tests #

Patch Set 4 : Remove log spam #

Patch Set 5 : Cleanup #

Patch Set 6 : More cleanup #

Patch Set 7 : Remove allowed_schemes attribute from url_pattern; go back to re-using valid_schemes #

Total comments: 4

Patch Set 8 : Check for scheme == chrome:// rather than matches when deciding whether to remove the chrome scheme… #

Patch Set 9 : Add a helper method to UserScript to get the appropriate valid schemes #

Total comments: 16

Patch Set 10 : Add unit tests #

Patch Set 11 : Reinstate original pickle order; add scripts clause to content_script_chrome_url_invalid.json to av… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -63 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/active_tab_permission_granter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/startup/bad_flags_prompt.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 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 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 8 9 10 chunks +70 lines, -29 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +101 lines, -3 lines 0 comments Download
M chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -2 lines 0 comments Download
M chrome/common/extensions/manifest_tests/extension_manifests_contentscript_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -2 lines 0 comments Download
M chrome/common/extensions/user_script.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -8 lines 0 comments Download
M chrome/common/extensions/user_script.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +29 lines, -10 lines 0 comments Download
M chrome/test/data/extensions/manifest_tests/content_script_chrome_url_invalid.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M extensions/common/url_pattern.h View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Matt Perry
I don't understand the difference between allowed_schemes and valid_schemes. Conceptually they seem like the same ...
7 years, 9 months ago (2013-03-16 01:16:29 UTC) #1
aboxhall
On 2013/03/16 01:16:29, Matt Perry wrote: > I don't understand the difference between allowed_schemes and ...
7 years, 9 months ago (2013-03-18 14:46:18 UTC) #2
aboxhall
On 2013/03/18 14:46:18, aboxhall wrote: > On 2013/03/16 01:16:29, Matt Perry wrote: > > I ...
7 years, 9 months ago (2013-03-18 14:48:14 UTC) #3
Matt Perry
https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc#newcode2178 chrome/common/extensions/extension.cc:2178: URLPattern pattern(UserScript::kValidUserScriptSchemes); How about this instead: replace kValidUserScriptSchemes with ...
7 years, 9 months ago (2013-03-19 00:43:15 UTC) #4
aboxhall
https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc#newcode2200 chrome/common/extensions/extension.cc:2200: !pattern.MatchesScheme(chrome::kChromeUIScheme)) { On 2013/03/19 00:43:15, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-19 00:47:47 UTC) #5
aboxhall
https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): https://codereview.chromium.org/12792005/diff/19001/chrome/common/extensions/extension.cc#newcode2178 chrome/common/extensions/extension.cc:2178: URLPattern pattern(UserScript::kValidUserScriptSchemes); On 2013/03/19 00:43:15, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-19 16:11:12 UTC) #6
Matt Perry
https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/extension.cc#newcode2194 chrome/common/extensions/extension.cc:2194: pattern.SetValidSchemes( Add a comment on what's happening here. https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/user_script.cc ...
7 years, 9 months ago (2013-03-19 17:49:32 UTC) #7
dmazzoni
https://codereview.chromium.org/12792005/diff/28001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/12792005/diff/28001/chrome/app/generated_resources.grd#newcode6320 chrome/app/generated_resources.grd:6320: + Enables running extensions on chrome:// URLs, where extensions ...
7 years, 9 months ago (2013-03-19 20:48:44 UTC) #8
aboxhall
Addressed comments, and added some tests. https://codereview.chromium.org/12792005/diff/28001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/12792005/diff/28001/chrome/app/generated_resources.grd#newcode6320 chrome/app/generated_resources.grd:6320: + Enables running ...
7 years, 9 months ago (2013-03-20 22:04:59 UTC) #9
Matt Perry
https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/user_script.cc File chrome/common/extensions/user_script.cc (right): https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/user_script.cc#newcode145 chrome/common/extensions/user_script.cc:145: pickle->WriteString(pattern->GetAsString()); On 2013/03/20 22:04:59, aboxhall wrote: > On 2013/03/19 ...
7 years, 9 months ago (2013-03-20 22:32:48 UTC) #10
aboxhall
https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/user_script.cc File chrome/common/extensions/user_script.cc (right): https://codereview.chromium.org/12792005/diff/28001/chrome/common/extensions/user_script.cc#newcode145 chrome/common/extensions/user_script.cc:145: pickle->WriteString(pattern->GetAsString()); On 2013/03/20 22:32:48, Matt Perry wrote: > On ...
7 years, 9 months ago (2013-03-20 22:51:47 UTC) #11
Matt Perry
lgtm
7 years, 9 months ago (2013-03-20 23:00:50 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/12792005/38001
7 years, 9 months ago (2013-03-20 23:12:35 UTC) #13
commit-bot: I haz the power
Presubmit check for 12792005-38001 failed and returned exit status 1. INFO:root:Found 19 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-20 23:12:44 UTC) #14
aboxhall
sky@, could you take a look at chrome/browser/ui/startup/bad_flags_prompt.cc for OWNERS?
7 years, 9 months ago (2013-03-20 23:17:47 UTC) #15
sky
LGTM
7 years, 9 months ago (2013-03-20 23:57:07 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/12792005/38001
7 years, 9 months ago (2013-03-21 00:02:55 UTC) #17
commit-bot: I haz the power
7 years, 9 months ago (2013-03-21 12:57:33 UTC) #18
Message was sent while issue was closed.
Change committed as 189586

Powered by Google App Engine
This is Rietveld 408576698