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

Issue 237793003: Use default CSP for resource loading in webview (instead of platform app's CSP) (Closed)

Created:
6 years, 8 months ago by lazyboy
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tfarina, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Use default CSP for resource loading in webview (instead of platform app's CSP) <webview> loads page in an isolated context inside platform app and hosts drive-by web. Platform app's CSP is too restrictive for <webview>, we stop using that CSP and use the default instead in this CL. BUG=363437 Test=Load an chrome app. Load a webview html from accessible resources. Make the webview page contain inline JS. Check that the JS loads. It didn't use to load w/o this CL. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264253

Patch Set 1 #

Patch Set 2 : ready for review, test pending #

Patch Set 3 : Add test #

Total comments: 8

Patch Set 4 : address comments from jamescook@ and yoyo@ #

Total comments: 2

Patch Set 5 : remove includes #

Patch Set 6 : Fix WebViewTest.Shim_TestNewWindow* #

Patch Set 7 : Add comment to added file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -7 lines) Patch
M apps/shell/browser/shell_extensions_browser_client.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M apps/shell/browser/shell_extensions_browser_client.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/apps/web_view_browsertest.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/url_request_util.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/url_request_util.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
chrome/test/data/extensions/platform_apps/web_view/shim/guest_with_inline_script.html View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 3 4 5 3 chunks +23 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/manifest.json View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_protocols.cc View 1 1 chunk +11 lines, -4 lines 0 comments Download
M extensions/browser/extensions_browser_client.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
lazyboy
Hi James, Can you review the CL? I will pass it to a process/security reviewer ...
6 years, 8 months ago (2014-04-15 00:07:15 UTC) #1
James Cook
yoz, can you take a look at this as an extensions OWNER? lazyboy, apologies for ...
6 years, 8 months ago (2014-04-15 17:21:21 UTC) #2
lazyboy
Thanks, let's wait for comments from Yoyo. https://chromiumcodereview.appspot.com/237793003/diff/40001/apps/shell/browser/shell_extensions_browser_client.h File apps/shell/browser/shell_extensions_browser_client.h (right): https://chromiumcodereview.appspot.com/237793003/diff/40001/apps/shell/browser/shell_extensions_browser_client.h#newcode1 apps/shell/browser/shell_extensions_browser_client.h:1: // Copyright ...
6 years, 8 months ago (2014-04-15 17:26:31 UTC) #3
Yoyo Zhou
https://chromiumcodereview.appspot.com/237793003/diff/40001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://chromiumcodereview.appspot.com/237793003/diff/40001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode120 chrome/browser/extensions/chrome_extensions_browser_client.cc:120: const content::ResourceRequestInfo* info = On 2014/04/15 17:21:21, James Cook ...
6 years, 8 months ago (2014-04-15 21:40:05 UTC) #4
lazyboy
Comments addressed in patchset #4. https://chromiumcodereview.appspot.com/237793003/diff/40001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://chromiumcodereview.appspot.com/237793003/diff/40001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode120 chrome/browser/extensions/chrome_extensions_browser_client.cc:120: const content::ResourceRequestInfo* info = ...
6 years, 8 months ago (2014-04-15 22:17:02 UTC) #5
Yoyo Zhou
LGTM
6 years, 8 months ago (2014-04-15 22:20:26 UTC) #6
James Cook
LGTM assuming you fix the includes https://chromiumcodereview.appspot.com/237793003/diff/60001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://chromiumcodereview.appspot.com/237793003/diff/60001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode18 chrome/browser/extensions/chrome_extensions_browser_client.cc:18: #include "chrome/browser/extensions/extension_renderer_state.h" Remove ...
6 years, 8 months ago (2014-04-15 22:38:38 UTC) #7
lazyboy
https://chromiumcodereview.appspot.com/237793003/diff/60001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://chromiumcodereview.appspot.com/237793003/diff/60001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode18 chrome/browser/extensions/chrome_extensions_browser_client.cc:18: #include "chrome/browser/extensions/extension_renderer_state.h" On 2014/04/15 22:38:38, James Cook wrote: > ...
6 years, 8 months ago (2014-04-15 22:41:59 UTC) #8
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 8 months ago (2014-04-16 13:01:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/237793003/80001
6 years, 8 months ago (2014-04-16 13:02:03 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 13:58:27 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 8 months ago (2014-04-16 13:58:27 UTC) #12
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 8 months ago (2014-04-16 14:42:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/237793003/80001
6 years, 8 months ago (2014-04-16 14:43:15 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 14:48:30 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 8 months ago (2014-04-16 14:48:31 UTC) #16
lazyboy
+Fady, Can you take a look at the chrome/test/data/extensions/platform_apps/web_view/shim/*? Currently guest.html has an inline script ...
6 years, 8 months ago (2014-04-16 15:25:15 UTC) #17
Fady Samuel
LGTM! Thanks for clearing up the confusion Istiaque! :-)
6 years, 8 months ago (2014-04-16 15:27:42 UTC) #18
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 8 months ago (2014-04-16 15:28:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/237793003/120001
6 years, 8 months ago (2014-04-16 15:28:41 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 16:36:16 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 8 months ago (2014-04-16 16:36:16 UTC) #22
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 8 months ago (2014-04-16 16:43:57 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/237793003/120001
6 years, 8 months ago (2014-04-16 16:44:57 UTC) #24
commit-bot: I haz the power
6 years, 8 months ago (2014-04-16 18:25:27 UTC) #25
Message was sent while issue was closed.
Change committed as 264253

Powered by Google App Engine
This is Rietveld 408576698