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

Issue 8659009: Consider the origin when computing extension permissions (Closed)

Created:
9 years ago by abarth-chromium
Modified:
9 years ago
Reviewers:
Aaron Boodman, aa
CC:
chromium-reviews, Erik does not do reviews, Paweł Hajdan Jr., mihaip+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Consider the origin when computing extension permissions This patch teaches the extension system to use the document's origin when computing extension permissions. Ideally, we'd use only the document's origin, but because app extents don't cover entire origins, we need to also consider the document's URL. BUG=103630 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112655

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 7

Patch Set 4 : '' #

Total comments: 1

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -50 lines) Patch
M chrome/browser/extensions/extension_info_map_unittest.cc View 1 2 3 4 3 chunks +20 lines, -4 lines 0 comments Download
M chrome/common/extensions/extension_set.h View 1 2 3 4 3 chunks +31 lines, -8 lines 0 comments Download
M chrome/common/extensions/extension_set.cc View 1 2 3 4 4 chunks +39 lines, -12 lines 0 comments Download
M chrome/common/extensions/extension_set_unittest.cc View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 6 chunks +14 lines, -7 lines 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_extension.cc View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 1 2 3 4 4 chunks +8 lines, -4 lines 0 comments Download
M chrome/renderer/extensions/extension_resource_request_policy.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/user_script_slave.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/user_script_slave.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
abarth-chromium
Thoughts on the approach? I need to write some integration tests too.
9 years ago (2011-11-28 20:19:26 UTC) #1
abarth-chromium
@aa: Thoughts on this CL?
9 years ago (2011-11-29 01:44:46 UTC) #2
aa
Looks complicated and subtle. I'm going to come back to it after I get the ...
9 years ago (2011-11-29 05:44:44 UTC) #3
Aaron Boodman
So what are the cases where origin.ToString() != document.url().GetOrigin().ToString()? Are there any others than the ...
9 years ago (2011-11-30 01:52:00 UTC) #4
abarth-chromium
On 2011/11/30 01:52:00, Aaron Boodman wrote: > So what are the cases where origin.ToString() != ...
9 years ago (2011-11-30 01:57:33 UTC) #5
Aaron Boodman
OK, not as bad as I initially read it. http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.cc File chrome/common/extensions/extension_set.cc (right): http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.cc#newcode37 chrome/common/extensions/extension_set.cc:37: ...
9 years ago (2011-11-30 02:01:31 UTC) #6
Aaron Boodman
http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.h File chrome/common/extensions/extension_set.h (right): http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.h#newcode49 chrome/common/extensions/extension_set.h:49: std::string GetIdByURL(WebKit::WebSecurityOrigin origin, On 2011/11/30 02:01:31, Aaron Boodman wrote: ...
9 years ago (2011-11-30 02:04:45 UTC) #7
abarth-chromium
Thanks for the review. http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.cc File chrome/common/extensions/extension_set.cc (right): http://codereview.chromium.org/8659009/diff/4004/chrome/common/extensions/extension_set.cc#newcode37 chrome/common/extensions/extension_set.cc:37: return origin.isUnique() ? "" : ...
9 years ago (2011-11-30 02:04:49 UTC) #8
aa
On Tue, Nov 29, 2011 at 6:04 PM, <abarth@chromium.org> wrote: > Thanks for the review. ...
9 years ago (2011-11-30 02:10:17 UTC) #9
abarth-chromium
Patch updated with fancy ExtensionURLInfo object.
9 years ago (2011-11-30 22:44:58 UTC) #10
Aaron Boodman
LGTM http://codereview.chromium.org/8659009/diff/15001/chrome/common/extensions/extension_set.h File chrome/common/extensions/extension_set.h (right): http://codereview.chromium.org/8659009/diff/15001/chrome/common/extensions/extension_set.h#newcode71 chrome/common/extensions/extension_set.h:71: std::string GetIdByInfo(const ExtensionURLInfo& info) const; sorry to nit, ...
9 years ago (2011-11-30 23:32:18 UTC) #11
abarth-chromium
> sorry to nit, but can you name it either GetIdByURL or GetIdByURLInfo ? Sure. ...
9 years ago (2011-11-30 23:34:45 UTC) #12
commit-bot: I haz the power
9 years ago (2011-12-02 07:23:25 UTC) #13

Powered by Google App Engine
This is Rietveld 408576698