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

Issue 913393003: Restrict extensionview to chrome-extension:// (Closed)

Created:
5 years, 10 months ago by apacible
Modified:
5 years, 10 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Restrict extensionview to chrome-extension:// only. To set an extension id for the extensionview, there must be a connect(extensionid, src); call. After an extension has been set, it cannot be reset without the guestview being destroyed/recreated. Once an extension has been set, the src can be modified to navigate to different pages for that extension. The extensionview will navigate to pages with format of chrome-extension://extensionid/page.html, where: extension="extensionid" and src="page.html" BUG=459680 Committed: https://crrev.com/19c01ac0d65560febf3d2ea5e843ff8a94afb694 Cr-Commit-Position: refs/heads/master@{#316884}

Patch Set 1 : #

Total comments: 15

Patch Set 2 #

Total comments: 9

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -38 lines) Patch
M chrome/browser/apps/guest_view/extension_view_browsertest.cc View 1 chunk +14 lines, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/connect_api/main.html View 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/extension_view/connect_api/main.js View 1 chunk +49 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/connect_api/manifest.json View 2 chunks +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/connect_api/test.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/extension_attribute/main.html View 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/extension_view/extension_attribute/main.js View 1 chunk +26 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/extension_attribute/manifest.json View 2 chunks +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/extension_view/extension_attribute/test.js View 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/extension_view/src_attribute/main.js View 2 chunks +1 line, -1 line 0 comments Download
M extensions/browser/guest_view/extension_view/extension_view_constants.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extension_view/extension_view_constants.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extension_view/extension_view_guest.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extension_view/extension_view_guest.cc View 1 2 3 4 5 4 chunks +46 lines, -8 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M extensions/renderer/resources/extensions_renderer_resources.grd View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/resources/guest_view/extension_view.js View 1 2 3 4 4 chunks +16 lines, -9 lines 0 comments Download
A extensions/renderer/resources/guest_view/extension_view_api_methods.js View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
M extensions/renderer/resources/guest_view/extension_view_attributes.js View 3 chunks +20 lines, -13 lines 0 comments Download
M extensions/renderer/resources/guest_view/extension_view_constants.js View 1 chunk +1 line, -0 lines 0 comments Download
A extensions/renderer/resources/guest_view/extension_view_events.js View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (21 generated)
apacible
fsamuel, PTAL. Thanks!
5 years, 10 months ago (2015-02-14 01:45:51 UTC) #15
Fady Samuel
https://codereview.chromium.org/913393003/diff/260001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): https://codereview.chromium.org/913393003/diff/260001/extensions/browser/guest_view/extension_view/extension_view_guest.cc#newcode44 extensions/browser/guest_view/extension_view/extension_view_guest.cc:44: GURL url(GetExtensionViewPage(src)); I would follow WebViewGuest's code to navigate ...
5 years, 10 months ago (2015-02-16 19:26:28 UTC) #16
apacible
fsamuel, PTAL. I have a couple of questions as well. Thanks! https://codereview.chromium.org/913393003/diff/260001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): ...
5 years, 10 months ago (2015-02-17 18:31:26 UTC) #19
Fady Samuel
I would also verify that the main frame never navigates outside of the extension: https://code.google.com/p/chromium/codesearch#chromium/src/extensions/browser/guest_view/extension_options/extension_options_guest.cc&q=extension_options_guest.cc&sq=package:chromium&type=cs&l=242 ...
5 years, 10 months ago (2015-02-17 18:48:29 UTC) #20
apacible
Plumbing loadcommit in next diff, but wanted to get a comment response out. https://codereview.chromium.org/913393003/diff/320001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File ...
5 years, 10 months ago (2015-02-17 20:07:30 UTC) #21
Fady Samuel
https://codereview.chromium.org/913393003/diff/340001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): https://codereview.chromium.org/913393003/diff/340001/extensions/browser/guest_view/extension_view/extension_view_guest.cc#newcode53 extensions/browser/guest_view/extension_view/extension_view_guest.cc:53: if (scheme_is_blocked || !url.is_valid()) { I think a simpler ...
5 years, 10 months ago (2015-02-17 20:17:04 UTC) #22
apacible
PTAL -- Added plumbing for loadcommit. Thanks! https://codereview.chromium.org/913393003/diff/340001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): https://codereview.chromium.org/913393003/diff/340001/extensions/browser/guest_view/extension_view/extension_view_guest.cc#newcode53 extensions/browser/guest_view/extension_view/extension_view_guest.cc:53: if (scheme_is_blocked ...
5 years, 10 months ago (2015-02-17 23:02:58 UTC) #25
Fady Samuel
https://codereview.chromium.org/913393003/diff/400001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): https://codereview.chromium.org/913393003/diff/400001/extensions/browser/guest_view/extension_view/extension_view_guest.cc#newcode48 extensions/browser/guest_view/extension_view/extension_view_guest.cc:48: bool urlNotAllowed = (url != GURL(url::kAboutBlankURL)) && nit: url_not_allowed ...
5 years, 10 months ago (2015-02-17 23:20:36 UTC) #26
apacible
PTAL. Also added DidNavigateMainFrame. Thanks! https://codereview.chromium.org/913393003/diff/400001/extensions/browser/guest_view/extension_view/extension_view_guest.cc File extensions/browser/guest_view/extension_view/extension_view_guest.cc (right): https://codereview.chromium.org/913393003/diff/400001/extensions/browser/guest_view/extension_view/extension_view_guest.cc#newcode48 extensions/browser/guest_view/extension_view/extension_view_guest.cc:48: bool urlNotAllowed = (url ...
5 years, 10 months ago (2015-02-18 00:04:12 UTC) #27
Fady Samuel
I think this is the last round. So lgtm + nits. https://codereview.chromium.org/913393003/diff/420001/extensions/browser/guest_view/extension_view/extension_view_constants.cc File extensions/browser/guest_view/extension_view/extension_view_constants.cc (right): ...
5 years, 10 months ago (2015-02-18 00:40:58 UTC) #28
apacible
Thanks! https://codereview.chromium.org/913393003/diff/420001/extensions/browser/guest_view/extension_view/extension_view_constants.cc File extensions/browser/guest_view/extension_view/extension_view_constants.cc (right): https://codereview.chromium.org/913393003/diff/420001/extensions/browser/guest_view/extension_view/extension_view_constants.cc#newcode14 extensions/browser/guest_view/extension_view/extension_view_constants.cc:14: const char kAttributeExtension[] = "extension"; On 2015/02/18 00:40:58, ...
5 years, 10 months ago (2015-02-18 00:56:15 UTC) #30
apacible
Adding OWNERS: rockot@: - extensions/renderer/dispatcher.cc - extensions/renderer/resources/extensions_renderer_resources.grd asvitkine@: - tools/metrics/actions/actions.xml PTAL. Thanks!
5 years, 10 months ago (2015-02-18 00:59:06 UTC) #32
Ken Rockot(use gerrit already)
On 2015/02/18 00:59:06, apacible wrote: > Adding OWNERS: > > rockot@: > - extensions/renderer/dispatcher.cc > ...
5 years, 10 months ago (2015-02-18 16:31:08 UTC) #33
Alexei Svitkine (slow)
lgtm
5 years, 10 months ago (2015-02-18 18:11:03 UTC) #34
Alexei Svitkine (slow)
However, this is a non-trivial enough change that it should have a BUG= and corresponding ...
5 years, 10 months ago (2015-02-18 18:11:32 UTC) #35
apacible
Thanks! On 2015/02/18 18:11:32, Alexei Svitkine wrote: > However, this is a non-trivial enough change ...
5 years, 10 months ago (2015-02-18 19:24:11 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/913393003/440001
5 years, 10 months ago (2015-02-18 19:25:27 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:440001)
5 years, 10 months ago (2015-02-18 20:32:40 UTC) #39
commit-bot: I haz the power
5 years, 10 months ago (2015-02-18 20:33:29 UTC) #40
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/19c01ac0d65560febf3d2ea5e843ff8a94afb694
Cr-Commit-Position: refs/heads/master@{#316884}

Powered by Google App Engine
This is Rietveld 408576698