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

Issue 789273006: Make ContentSettingsObserver security checks work with OOPIF. (Closed)

Created:
6 years ago by alexmos
Modified:
5 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ContentSettingsObserver security checks work with OOPIF. ContentSettingsObserver has several security checks that use the current frame's and the top frame's WebSecurityOrigin. For example, these checks are used when accessing localStorage, indexedDB, openDatabase, and webkitRequestFileSystem. With --site-per-process, when the top frame is remote, these checks crashed the renderer because they tried to get the SecurityOrigin of the top frame's Document, which doesn't exist. This CL fixes these checks to access SecurityOrigins on frames, where the remote case is handled properly as part of origin replication (https://crbug.com/426512). It also adds an OOPIF browser test to ensure that the remote case works. BUG=426512 Committed: https://crrev.com/75648bb31c04beca9c3a2507343ab2bf4a5bbae0 Cr-Commit-Position: refs/heads/master@{#310366}

Patch Set 1 #

Patch Set 2 : #

Total comments: 21

Patch Set 3 : Address Charlie's feedback #

Patch Set 4 : git cl format #

Total comments: 4

Patch Set 5 : Nits #

Total comments: 4

Patch Set 6 : Address Jochen's nit #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -75 lines) Patch
A chrome/browser/chrome_site_per_process_browsertest.cc View 1 2 3 4 5 6 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 3 4 5 6 6 chunks +23 lines, -23 lines 0 comments Download
M chrome/test/data/iframe.html View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/site_per_process_browsertest.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 14 chunks +25 lines, -47 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
alexmos
Charlie, could you please take a look? I'm converting a few security checks in ContentSettingsObserver ...
6 years ago (2014-12-11 18:45:18 UTC) #2
Charlie Reis
Great! I'm glad to see the replication start to fix issues. One question about the ...
6 years ago (2014-12-12 18:02:45 UTC) #3
alexmos
https://codereview.chromium.org/789273006/diff/20001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/789273006/diff/20001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode1 chrome/browser/chrome_site_per_process_browsertest.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
6 years ago (2014-12-13 00:58:13 UTC) #4
Charlie Reis
LGTM, and let's follow up with content settings folks for the top-level URL fallback case. ...
6 years ago (2014-12-15 20:25:36 UTC) #5
alexmos
Thanks for the review! > I didn't see any change to extension_webui_apitest.cc here. Do you ...
6 years ago (2014-12-15 21:22:19 UTC) #6
alexmos
Jochen, could you please review this for chrome/ owners approval? Also, do you have any ...
6 years ago (2014-12-15 22:33:12 UTC) #8
markusheintz_
https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc#newcode118 chrome/renderer/content_settings_observer.cc:118: WebString top_origin = frame->top()->securityOrigin().toString(); What security origin are you ...
6 years ago (2014-12-16 13:04:43 UTC) #10
alexmos
https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc#newcode118 chrome/renderer/content_settings_observer.cc:118: WebString top_origin = frame->top()->securityOrigin().toString(); On 2014/12/16 13:04:43, markusheintz_ wrote: ...
6 years ago (2014-12-16 20:13:26 UTC) #11
alexmos
Jochen - ping for chrome/ owners approval. The current patch doesn't change ContentSettingsObserver behavior without ...
6 years ago (2014-12-18 19:48:20 UTC) #12
markusheintz_
On 2014/12/16 20:13:26, alexmos wrote: > https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc > File chrome/renderer/content_settings_observer.cc (right): > > https://codereview.chromium.org/789273006/diff/80001/chrome/renderer/content_settings_observer.cc#newcode118 > ...
6 years ago (2014-12-19 18:32:51 UTC) #13
alexmos
On 2014/12/19 18:32:51, markusheintz_ (ooo until Jan 9 wrote: > On 2014/12/16 20:13:26, alexmos wrote: ...
5 years, 11 months ago (2015-01-06 23:33:50 UTC) #14
Charlie Reis
On 2015/01/06 23:33:50, alexmos wrote: > Jochen - another friendly ping for chrome/ owners approval. ...
5 years, 11 months ago (2015-01-07 00:13:26 UTC) #15
alexmos
sky@, could you please review chrome/, since jochen@ is OOO?
5 years, 11 months ago (2015-01-07 00:24:29 UTC) #17
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/789273006/diff/80001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/789273006/diff/80001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode27 chrome/browser/chrome_site_per_process_browsertest.cc:27: ChromeSitePerProcessTest() {} nit. please add a virtual dtor
5 years, 11 months ago (2015-01-07 13:42:46 UTC) #18
sky
-sky as Jochen is back
5 years, 11 months ago (2015-01-07 17:08:15 UTC) #20
alexmos
Thanks! https://codereview.chromium.org/789273006/diff/80001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/789273006/diff/80001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode27 chrome/browser/chrome_site_per_process_browsertest.cc:27: ChromeSitePerProcessTest() {} On 2015/01/07 13:42:46, jochen (slow) wrote: ...
5 years, 11 months ago (2015-01-07 20:43:12 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/789273006/120001
5 years, 11 months ago (2015-01-07 20:51:22 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 11 months ago (2015-01-07 21:06:56 UTC) #24
commit-bot: I haz the power
5 years, 11 months ago (2015-01-07 21:07:49 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/75648bb31c04beca9c3a2507343ab2bf4a5bbae0
Cr-Commit-Position: refs/heads/master@{#310366}

Powered by Google App Engine
This is Rietveld 408576698