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

Issue 10387074: Only disallow top-level navigations in platform apps (Closed)

Created:
8 years, 7 months ago by Mihai Parparita -not on Chrome
Modified:
8 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, Aaron Boodman, mihaip-chromium-reviews_chromium.org, jam, darin-cc_chromium.org
Visibility:
Public.

Description

r118246 added a mode where all navigations were sent to the browser process, so that for platform apps we could ignore them. However, we still want to allow platform apps to have iframes that point to app pages or data: URLs, so the check needs to be made a bit more fine-grained. The fine-grained check will be implemented in a follow-up CL (via CSP), for now all frame navigations are allowed. R=miket@chromium.org,abarth@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138304

Patch Set 1 #

Patch Set 2 : Lint #

Total comments: 7

Patch Set 3 : Mike's review feedback #

Total comments: 8

Patch Set 4 : Tweak name, add test for filesystem: URLs. #

Patch Set 5 : Add blob: URLs, use WebSecurityOrigin #

Total comments: 2

Patch Set 6 : Switch to only denying top-level loads via RenderViewImpl. #

Patch Set 7 : Skip test #

Total comments: 6

Patch Set 8 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -69 lines) Patch
M chrome/browser/extensions/platform_app_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/external_tab/external_tab_container_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/extensions/shell_window.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/iframes/local-iframe.html View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/iframes/main.html View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/iframes/main.js View 1 2 3 4 5 6 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/iframes/manifest.json View 1 chunk +13 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/iframes/remote-iframe.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/iframes/remote-iframe.js View 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/iframes/test.js View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/navigation/main.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/platform_apps/navigation/nav-target.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/common/renderer_preferences.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/public/common/renderer_preferences.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 3 chunks +51 lines, -41 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
Mihai Parparita -not on Chrome
8 years, 7 months ago (2012-05-11 00:27:34 UTC) #1
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10387074/diff/3001/content/public/common/renderer_preferences.h File content/public/common/renderer_preferences.h (right): http://codereview.chromium.org/10387074/diff/3001/content/public/common/renderer_preferences.h#newcode76 content/public/common/renderer_preferences.h:76: bool browser_handles_all_top_level_or_non_local_requests; This name is kind of a mouthful. ...
8 years, 7 months ago (2012-05-11 00:30:59 UTC) #2
miket_OOO
LGTM. Just some silly nits. http://codereview.chromium.org/10387074/diff/3001/chrome/test/data/extensions/platform_apps/iframes/main.html File chrome/test/data/extensions/platform_apps/iframes/main.html (right): http://codereview.chromium.org/10387074/diff/3001/chrome/test/data/extensions/platform_apps/iframes/main.html#newcode2 chrome/test/data/extensions/platform_apps/iframes/main.html:2: * Copyright (c) 2012 ...
8 years, 7 months ago (2012-05-11 18:29:07 UTC) #3
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10387074/diff/3001/chrome/test/data/extensions/platform_apps/iframes/main.html File chrome/test/data/extensions/platform_apps/iframes/main.html (right): http://codereview.chromium.org/10387074/diff/3001/chrome/test/data/extensions/platform_apps/iframes/main.html#newcode2 chrome/test/data/extensions/platform_apps/iframes/main.html:2: * Copyright (c) 2012 The Chromium Authors. All rights ...
8 years, 7 months ago (2012-05-11 19:40:49 UTC) #4
Mihai Parparita -not on Chrome
John's OOO this week. Darin, do you have time to look at these navigation-related content/ ...
8 years, 7 months ago (2012-05-11 19:42:11 UTC) #5
darin (slow to review)
http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc#newcode5218 content/renderer/render_view_impl.cc:5218: bool RenderViewImpl::IsNonLocalOrTopLevelNavigation( it seems like you are using "NonLocal" ...
8 years, 7 months ago (2012-05-12 00:00:50 UTC) #6
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc#newcode5218 content/renderer/render_view_impl.cc:5218: bool RenderViewImpl::IsNonLocalOrTopLevelNavigation( On 2012/05/12 00:00:51, darin wrote: > it ...
8 years, 7 months ago (2012-05-15 20:51:46 UTC) #7
darin (slow to review)
http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc#newcode5218 content/renderer/render_view_impl.cc:5218: bool RenderViewImpl::IsNonLocalOrTopLevelNavigation( On 2012/05/15 20:51:46, Mihai Parparita wrote: > ...
8 years, 7 months ago (2012-05-15 23:58:43 UTC) #8
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/10387074/diff/6001/content/renderer/render_view_impl.cc#newcode5218 content/renderer/render_view_impl.cc:5218: bool RenderViewImpl::IsNonLocalOrTopLevelNavigation( On 2012/05/15 23:58:44, darin wrote: > What ...
8 years, 7 months ago (2012-05-16 00:36:45 UTC) #9
darin (slow to review)
I think you should get Adam Barth to review this code. I get nervous reviewing ...
8 years, 7 months ago (2012-05-16 06:37:12 UTC) #10
Mihai Parparita -not on Chrome
Adam, can you take a look at this? The intent is to implement the platform ...
8 years, 7 months ago (2012-05-16 17:34:55 UTC) #11
abarth-chromium
We can't enforce this with CSP?
8 years, 7 months ago (2012-05-18 18:28:12 UTC) #12
abarth-chromium
I talked with Mihai, and he's going to investigate a CSP-based approach. Below are some ...
8 years, 7 months ago (2012-05-18 18:34:07 UTC) #13
Mihai Parparita -not on Chrome
On 2012/05/18 18:34:07, abarth wrote: > I talked with Mihai, and he's going to investigate ...
8 years, 7 months ago (2012-05-18 22:43:05 UTC) #14
abarth-chromium
It's hard for me to review this patch because most of this code is wrong. ...
8 years, 7 months ago (2012-05-21 20:44:19 UTC) #15
abarth-chromium
Also, the function name doesn't really match what the function does because the function cares ...
8 years, 7 months ago (2012-05-21 20:45:00 UTC) #16
abarth-chromium
Also, the function name doesn't really match what the function does because the function cares ...
8 years, 7 months ago (2012-05-21 20:45:01 UTC) #17
abarth-chromium
Sorry, I didn't mean to sound negative. I see that you're just moving this code ...
8 years, 7 months ago (2012-05-21 20:57:44 UTC) #18
Mihai Parparita -not on Chrome
On Mon, May 21, 2012 at 1:57 PM, <abarth@chromium.org> wrote: > Sorry, I didn't mean ...
8 years, 7 months ago (2012-05-21 21:17:28 UTC) #19
abarth-chromium
> I can leave it alone if you think that's best. I don't have strong ...
8 years, 7 months ago (2012-05-21 21:27:07 UTC) #20
Mihai Parparita -not on Chrome
Darin: back to you for general contents/ review. Scary origin checks are gone.
8 years, 7 months ago (2012-05-21 21:30:18 UTC) #21
darin (slow to review)
I realize you're just moving code, but here's some nits for the existing code... http://codereview.chromium.org/10387074/diff/9002/content/renderer/render_view_impl.cc ...
8 years, 7 months ago (2012-05-21 22:09:53 UTC) #22
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10387074/diff/9002/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): http://codereview.chromium.org/10387074/diff/9002/content/renderer/render_view_impl.cc#newcode399 content/renderer/render_view_impl.cc:399: WebKit::WebFrame* frame, On 2012/05/21 22:09:54, darin wrote: > nit: ...
8 years, 7 months ago (2012-05-21 22:13:00 UTC) #23
darin (slow to review)
LGTM
8 years, 7 months ago (2012-05-21 22:25:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mihaip@chromium.org/10387074/23001
8 years, 7 months ago (2012-05-21 22:27:57 UTC) #25
commit-bot: I haz the power
Try job failure for 10387074-23001 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 7 months ago (2012-05-22 00:26:57 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mihaip@chromium.org/10387074/23001
8 years, 7 months ago (2012-05-22 00:54:15 UTC) #27
commit-bot: I haz the power
Try job failure for 10387074-23001 (retry) (retry) on win_rel for steps "base_unittests, sync_unit_tests" (clobber build). ...
8 years, 7 months ago (2012-05-22 08:20:15 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mihaip@chromium.org/10387074/23001
8 years, 7 months ago (2012-05-22 15:26:29 UTC) #29
commit-bot: I haz the power
Try job failure for 10387074-23001 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 7 months ago (2012-05-22 15:55:46 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mihaip@chromium.org/10387074/23001
8 years, 7 months ago (2012-05-22 17:01:59 UTC) #31
commit-bot: I haz the power
8 years, 7 months ago (2012-05-22 18:18:24 UTC) #32
Try job failure for 10387074-23001 (retry) on win for step "compile" (clobber
build).
It's a second try, previously, step "compile" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number...

Powered by Google App Engine
This is Rietveld 408576698