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

Issue 199074: Don't allow updating tabs to javascript URLs without host (Closed)

Created:
11 years, 3 months ago by Aaron Boodman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Don't allow updating tabs to javascript URLs without host permissions to that tab. Cleaned up a few things along the way: - added a GetExtension() method to ExtensionFunctionDispatcher and ExtensionFunction since it was used in more than one place. - Removed first param from chrome.test.failCallback() since it wasn't used anywhere. - Added a convenience CanAccessHost() method to Extension, since it seems likely to be commonly used. - Refactored setup of mock host resolver in browsertest, since the way it was, you could only customize it at the testsuite level, not the test level. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25971

Patch Set 1 #

Patch Set 2 : Remove unchanged file #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -54 lines) Patch
M chrome/browser/extensions/extension_function.h View 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_javascript_url_apitest.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_module.cc View 6 chunks +22 lines, -14 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_module_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_module_constants.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_scraper_unittest.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 chunk +7 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension.cc View 2 chunks +14 lines, -0 lines 2 comments Download
M chrome/common/extensions/url_pattern.h View 1 chunk +4 lines, -0 lines 2 comments Download
M chrome/renderer/renderer_resources.grd View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/resources/extension_apitest.js View 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/README.txt View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/bookmarks/test.js View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/javascript_url_permissions/manifest.json View 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/javascript_url_permissions/test.html View 1 chunk +27 lines, -0 lines 0 comments Download
M chrome/test/in_process_browser_test.h View 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/test/in_process_browser_test.cc View 3 chunks +11 lines, -16 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Aaron Boodman
I still need to follow up on the TODO in extension_tabs_module.cc. I will do that ...
11 years, 3 months ago (2009-09-10 08:48:00 UTC) #1
Erik does not do reviews
http://codereview.chromium.org/199074/diff/1022/1032 File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/199074/diff/1022/1032#newcode985 Line 985: // The path component is not used for ...
11 years, 3 months ago (2009-09-10 18:23:21 UTC) #2
Aaron Boodman
http://codereview.chromium.org/199074/diff/1022/1032 File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/199074/diff/1022/1032#newcode985 Line 985: // The path component is not used for ...
11 years, 3 months ago (2009-09-10 18:55:31 UTC) #3
Erik does not do reviews
11 years, 3 months ago (2009-09-10 18:58:25 UTC) #4
LGTM

On Thu, Sep 10, 2009 at 11:55 AM,  <aa@chromium.org> wrote:
>
> http://codereview.chromium.org/199074/diff/1022/1032
> File chrome/common/extensions/extension.cc (right):
>
> http://codereview.chromium.org/199074/diff/1022/1032#newcode985
> Line 985: // The path component is not used for host permissions, so we
> force it to
> On 2009/09/10 18:23:21, Erik Kay wrote:
>>
>> I guess this means we can wind up with multiple duplicate entries in
>> host_permissions_. =A0Not that big of a deal, but it might be worth
>
> cleaning that
>>
>> up.
>
> Actually the permissions are kept in a vector now, so there can already
> be dupes. I will probably change it to a set at some point but it
> doesn't really matter for anything right now.
>
> http://codereview.chromium.org/199074/diff/1022/1034
> File chrome/common/extensions/url_pattern.h (right):
>
> http://codereview.chromium.org/199074/diff/1022/1034#newcode103
> Line 103: path_escaped_ =3D "";
> On 2009/09/10 18:23:21, Erik Kay wrote:
>>
>> Is this just unimplemented?
>
> I'm resetting it because the escaped form is computed and cached lazily
> the first time it is used.
>
> http://codereview.chromium.org/199074
>

Powered by Google App Engine
This is Rietveld 408576698