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

Issue 78303005: ContentSettings API should not interact with <webview> (Closed)

Created:
7 years, 1 month ago by Fady Samuel
Modified:
7 years ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

ContentSettings API should not interact with <webview> The extension contentSettings API (http://developer.chrome.com/extensions/contentSettings.html) was affecting the behavior of <webview> content. This CL isolates <webview> and other <*view> from this API. BUG=320109 Test=Try an extension that uses the content settings API and verify that <webview> content is not impacted. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238534

Patch Set 1 #

Patch Set 2 : Tweaked and wroks #

Patch Set 3 : Cleanup #

Patch Set 4 : Small cleanup/refactor #

Total comments: 6

Patch Set 5 : Fixed nits + Added missing file #

Total comments: 2

Patch Set 6 : Addressed jam@'s comments #

Patch Set 7 : Cleanup: Removed unnecessary change #

Patch Set 8 : Simplified patch according to comments #

Total comments: 6

Patch Set 9 : Addressed comments #

Total comments: 8

Patch Set 10 : Addressed Jochen's comments #

Total comments: 4

Patch Set 11 : Addressed Jochen's remaining comments #

Total comments: 2

Patch Set 12 : Removed unnecessary churn #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -29 lines) Patch
M chrome/browser/apps/web_view_browsertest.cc View 1 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/guestview/guestview.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/guestview/guestview.cc View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_script/README View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_script/content_script.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_script/manifest.json View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_settings/README View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_settings/background.js View 1 chunk +6 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/extension_api/content_settings/content_script.js View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/extension_api/content_settings/manifest.json View 1 chunk +9 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/shim/inject_comm_channel.js View 1 2 3 4 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/inject_resize_test.js View 1 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 3 4 3 chunks +40 lines, -4 lines 0 comments Download
M content/public/common/url_constants.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 45 (0 generated)
Fady Samuel
7 years, 1 month ago (2013-11-22 21:04:01 UTC) #1
Fady Samuel
7 years ago (2013-11-25 15:52:18 UTC) #2
markusheintz_
LGTM https://codereview.chromium.org/78303005/diff/80001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode975 chrome/browser/chrome_content_browser_client.cc:975: &rules); nit: I guess this fits into the ...
7 years ago (2013-11-25 18:04:41 UTC) #3
Fady Samuel
+jam@ for chrome/browser*, chrome/renderer/* OWNER approval. https://codereview.chromium.org/78303005/diff/80001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode975 chrome/browser/chrome_content_browser_client.cc:975: &rules); On 2013/11/25 ...
7 years ago (2013-11-25 21:54:01 UTC) #4
jam
also, jochen would be a better src\chrome owners since he wrote a lot of the ...
7 years ago (2013-11-25 22:42:35 UTC) #5
jam
https://codereview.chromium.org/78303005/diff/110001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/78303005/diff/110001/content/browser/renderer_host/render_view_host_impl.cc#newcode1379 content/browser/renderer_host/render_view_host_impl.cc:1379: GetContentClient()->browser()->RenderViewReady(this); On 2013/11/25 22:42:35, jam wrote: > this duplicates ...
7 years ago (2013-11-25 22:51:53 UTC) #6
jochen (gone - plz use gerrit)
Isn't a webview a per-process thing anyway? I'm worried that we're sending a potentially large ...
7 years ago (2013-11-26 13:51:24 UTC) #7
markusheintz_
On 2013/11/26 13:51:24, jochen wrote: > Isn't a webview a per-process thing anyway? > > ...
7 years ago (2013-11-26 13:54:37 UTC) #8
jochen (gone - plz use gerrit)
On 2013/11/26 13:54:37, markusheintz_ wrote: > On 2013/11/26 13:51:24, jochen wrote: > > Isn't a ...
7 years ago (2013-11-26 13:57:39 UTC) #9
Fady Samuel
On 2013/11/26 13:57:39, jochen wrote: > On 2013/11/26 13:54:37, markusheintz_ wrote: > > On 2013/11/26 ...
7 years ago (2013-11-26 15:58:08 UTC) #10
Fady Samuel
On 2013/11/26 15:58:08, Fady Samuel wrote: > On 2013/11/26 13:57:39, jochen wrote: > > On ...
7 years ago (2013-11-26 15:59:01 UTC) #11
markusheintz_
On 2013/11/26 15:59:01, Fady Samuel wrote: > On 2013/11/26 15:58:08, Fady Samuel wrote: > > ...
7 years ago (2013-11-26 16:08:53 UTC) #12
Fady Samuel
On 2013/11/26 16:08:53, markusheintz_ wrote: > On 2013/11/26 15:59:01, Fady Samuel wrote: > > On ...
7 years ago (2013-11-26 16:11:53 UTC) #13
markusheintz_
On 2013/11/26 16:11:53, Fady Samuel wrote: > On 2013/11/26 16:08:53, markusheintz_ wrote: > > On ...
7 years ago (2013-11-26 16:23:26 UTC) #14
Fady Samuel
PTAL jochen@, I've addressed jam@'s concern. I've removed ContentBrowserClient::RenderViewReady.
7 years ago (2013-11-26 16:40:54 UTC) #15
jam
It sounds like right now content settings don't apply to webview. If I'm understanding you ...
7 years ago (2013-11-26 17:14:40 UTC) #16
Fady Samuel
On 2013/11/26 17:14:40, jam wrote: > It sounds like right now content settings don't apply ...
7 years ago (2013-11-26 19:59:35 UTC) #17
Fady Samuel
PTAL jochen@. I've simplified this patch greatly. Chrome App processes, and <webview> guest processes do ...
7 years ago (2013-11-26 22:53:17 UTC) #18
jochen (gone - plz use gerrit)
I wonder whether it isn't enough to add kSwappedOutScheme to ContentSettingsObserver::IsWhitelistedForContentSettings?
7 years ago (2013-11-27 14:29:29 UTC) #19
Fady Samuel
On 2013/11/27 14:29:29, jochen wrote: > I wonder whether it isn't enough to add kSwappedOutScheme ...
7 years ago (2013-11-27 14:34:14 UTC) #20
Fady Samuel
7 years ago (2013-11-27 14:34:38 UTC) #21
Charlie Reis
https://codereview.chromium.org/78303005/diff/170001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/170001/chrome/browser/chrome_content_browser_client.cc#newcode1277 chrome/browser/chrome_content_browser_client.cc:1277: (!extension || !extension->is_platform_app()); This condition is really hard to ...
7 years ago (2013-11-27 17:35:54 UTC) #22
jochen (gone - plz use gerrit)
Charlie, what do you think about just whitelisting swappedout://? That's what we do for everything ...
7 years ago (2013-11-27 17:55:41 UTC) #23
jochen (gone - plz use gerrit)
Charlie, what do you think about just whitelisting swappedout://? That's what we do for everything ...
7 years ago (2013-11-27 17:55:43 UTC) #24
Charlie Reis
On 2013/11/27 17:55:43, jochen wrote: > Charlie, what do you think about just whitelisting swappedout://? ...
7 years ago (2013-11-27 18:11:32 UTC) #25
jochen (gone - plz use gerrit)
On 2013/11/27 18:11:32, creis wrote: > On 2013/11/27 17:55:43, jochen wrote: > > Charlie, what ...
7 years ago (2013-11-27 20:11:20 UTC) #26
jochen (gone - plz use gerrit)
So after some back and forth, what about this: we add a content API RenderView::IsBrowserPluginProxy() ...
7 years ago (2013-11-27 21:27:02 UTC) #27
Charlie Reis
On 2013/11/27 21:27:02, jochen wrote: > So after some back and forth, what about this: ...
7 years ago (2013-11-27 21:46:22 UTC) #28
jam
On 2013/11/27 21:46:22, creis wrote: > On 2013/11/27 21:27:02, jochen wrote: > > So after ...
7 years ago (2013-11-27 22:05:56 UTC) #29
jochen (gone - plz use gerrit)
On 2013/11/27 22:05:56, jam wrote: > On 2013/11/27 21:46:22, creis wrote: > > On 2013/11/27 ...
7 years ago (2013-11-28 15:52:44 UTC) #30
jochen (gone - plz use gerrit)
I added some specific comments https://codereview.chromium.org/78303005/diff/170001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/170001/chrome/browser/chrome_content_browser_client.cc#newcode1276 chrome/browser/chrome_content_browser_client.cc:1276: bool inject_content_rules = !site_instance->GetProcess()->IsGuest() ...
7 years ago (2013-11-28 22:23:29 UTC) #31
jam
On 2013/11/28 15:52:44, jochen wrote: > On 2013/11/27 22:05:56, jam wrote: > > On 2013/11/27 ...
7 years ago (2013-12-02 17:22:10 UTC) #32
jochen (gone - plz use gerrit)
On 2013/12/02 17:22:10, jam wrote: > On 2013/11/28 15:52:44, jochen wrote: > > On 2013/11/27 ...
7 years ago (2013-12-02 18:05:48 UTC) #33
Fady Samuel
Hi Jochen, I believe I've addressed all comments. Please take a look at GuestView::GetDefaultContentSettingRules. I'm ...
7 years ago (2013-12-03 00:24:04 UTC) #34
jochen (gone - plz use gerrit)
mostly looks good https://codereview.chromium.org/78303005/diff/190001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/190001/chrome/browser/chrome_content_browser_client.cc#newcode1276 chrome/browser/chrome_content_browser_client.cc:1276: RendererContentSettingRules rules; can we keep this ...
7 years ago (2013-12-03 08:55:20 UTC) #35
Fady Samuel
PTAL Jochen. https://codereview.chromium.org/78303005/diff/190001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/190001/chrome/browser/chrome_content_browser_client.cc#newcode1276 chrome/browser/chrome_content_browser_client.cc:1276: RendererContentSettingRules rules; On 2013/12/03 08:55:21, jochen wrote: ...
7 years ago (2013-12-03 15:31:26 UTC) #36
jochen (gone - plz use gerrit)
lgtm from my side with comments addressed https://codereview.chromium.org/78303005/diff/210001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/78303005/diff/210001/chrome/browser/chrome_content_browser_client.cc#newcode947 chrome/browser/chrome_content_browser_client.cc:947: GuestView::GetDefaultContentSettingRules(&rules, false ...
7 years ago (2013-12-03 15:35:06 UTC) #37
Fady Samuel
Charlie, are you OK with this change as a short term solution until swapped out ...
7 years ago (2013-12-03 15:56:26 UTC) #38
Charlie Reis
Ok, I suppose we can expose swappedout:// until we get RenderFrameProxy in place. LGTM. https://codereview.chromium.org/78303005/diff/230001/chrome/browser/chrome_content_browser_client.cc ...
7 years ago (2013-12-03 18:36:04 UTC) #39
Fady Samuel
I've addressed Charlie's comment. John, since you looked at this CL earlier, could you please ...
7 years ago (2013-12-03 18:50:55 UTC) #40
jam
lgtm
7 years ago (2013-12-03 18:57:19 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/78303005/250001
7 years ago (2013-12-03 18:58:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/78303005/250001
7 years ago (2013-12-03 19:11:49 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/78303005/250001
7 years ago (2013-12-03 23:38:14 UTC) #44
commit-bot: I haz the power
7 years ago (2013-12-04 03:01:30 UTC) #45
Message was sent while issue was closed.
Change committed as 238534

Powered by Google App Engine
This is Rietveld 408576698