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

Issue 1835753002: Reset content settings caches during provisional load start instead of commit. (Closed)

Created:
4 years, 9 months ago by meacer
Modified:
4 years, 8 months ago
CC:
chromium-reviews, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reset content settings caches during provisional load start instead of commit. ContentSettingsObserver caches some content settings for performance reasons (cached_storage_permissions_, cached_script_permissions_ and temporarily_allowed_plugins_). These are cleared in DidCommitProvisionalLoad. However, a frame can query JS blocking status before DidCommitProvisionalLoad, and can see a stale setting if the setting is changed before page load. This causes noscript tags not being rendered or rendered alongside script tags. This CL clears the cache in DidStartProvisionalLoad instead, allowing all page loading code to see the same content setting. BUG=232410

Patch Set 1 #

Patch Set 2 : Fix android build #

Patch Set 3 : Remove same page check #

Patch Set 4 : Add a browsertest #

Patch Set 5 : Add another browsertest #

Total comments: 6

Patch Set 6 : Move things under DidCreateNewDocument instead of DidStartProvisionalLoad #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -47 lines) Patch
M chrome/renderer/content_settings_observer.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 3 4 5 3 chunks +14 lines, -14 lines 2 comments Download
M chrome/renderer/content_settings_observer_browsertest.cc View 1 2 3 4 5 7 chunks +124 lines, -33 lines 0 comments Download

Messages

Total messages: 31 (4 generated)
meacer
thestig: Can you PTAL? Thanks.
4 years, 8 months ago (2016-03-29 00:04:34 UTC) #4
Lei Zhang
jochen/bauerb are probably more qualified to review this. https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer_browsertest.cc File chrome/renderer/content_settings_observer_browsertest.cc (right): https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer_browsertest.cc#newcode346 chrome/renderer/content_settings_observer_browsertest.cc:346: std::string ...
4 years, 8 months ago (2016-03-29 00:13:45 UTC) #6
Bernhard Bauer
Note that the things that are cleared here aren't purely caches of information that we'd ...
4 years, 8 months ago (2016-03-29 08:33:34 UTC) #7
meacer
On 2016/03/29 08:33:34, Bernhard Bauer wrote: > Note that the things that are cleared here ...
4 years, 8 months ago (2016-03-29 18:34:28 UTC) #8
meacer
https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer.cc#newcode240 chrome/renderer/content_settings_observer.cc:240: void ContentSettingsObserver::DidStartProvisionalLoad() { On 2016/03/29 08:33:33, Bernhard Bauer wrote: ...
4 years, 8 months ago (2016-03-29 18:34:36 UTC) #9
jochen (gone - plz use gerrit)
before the provisional load committed, the old URL is still active, so if we reget ...
4 years, 8 months ago (2016-03-30 16:31:34 UTC) #10
meacer
On 2016/03/30 16:31:34, jochen wrote: > before the provisional load committed, the old URL is ...
4 years, 8 months ago (2016-03-30 20:54:30 UTC) #11
meacer
https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer_browsertest.cc File chrome/renderer/content_settings_observer_browsertest.cc (right): https://codereview.chromium.org/1835753002/diff/80001/chrome/renderer/content_settings_observer_browsertest.cc#newcode346 chrome/renderer/content_settings_observer_browsertest.cc:346: std::string html = On 2016/03/29 00:13:45, Lei Zhang wrote: ...
4 years, 8 months ago (2016-03-30 20:55:08 UTC) #12
Bernhard Bauer
LGTM!
4 years, 8 months ago (2016-03-31 09:03:21 UTC) #13
jochen (gone - plz use gerrit)
I don't think that's the right solution. I'm not quite sure what happens here. Can ...
4 years, 8 months ago (2016-03-31 15:26:20 UTC) #14
meacer
On 2016/03/31 15:26:20, jochen wrote: > I don't think that's the right solution. To be ...
4 years, 8 months ago (2016-04-01 19:06:44 UTC) #15
meacer
https://codereview.chromium.org/1835753002/diff/90001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/1835753002/diff/90001/chrome/renderer/content_settings_observer.cc#newcode227 chrome/renderer/content_settings_observer.cc:227: void ContentSettingsObserver::DidCreateNewDocument() { On 2016/03/31 15:26:19, jochen wrote: > ...
4 years, 8 months ago (2016-04-01 19:06:56 UTC) #16
jochen (gone - plz use gerrit)
On 2016/04/01 at 19:06:44, meacer wrote: > On 2016/03/31 15:26:20, jochen wrote: > > I ...
4 years, 8 months ago (2016-04-01 20:08:47 UTC) #17
meacer
On 2016/04/01 20:08:47, jochen wrote: > On 2016/04/01 at 19:06:44, meacer wrote: > > On ...
4 years, 8 months ago (2016-04-01 20:16:05 UTC) #18
jochen (gone - plz use gerrit)
On 2016/04/01 at 20:16:05, meacer wrote: > On 2016/04/01 20:08:47, jochen wrote: > > On ...
4 years, 8 months ago (2016-04-01 20:21:03 UTC) #19
meacer
On 2016/04/01 20:21:03, jochen wrote: > On 2016/04/01 at 20:16:05, meacer wrote: > > On ...
4 years, 8 months ago (2016-04-01 20:27:10 UTC) #20
jochen (gone - plz use gerrit)
On 2016/04/01 at 20:27:10, meacer wrote: > On 2016/04/01 20:21:03, jochen wrote: > > On ...
4 years, 8 months ago (2016-04-01 20:43:39 UTC) #21
meacer
dcheng, japhet: Can you please comment on the ordering of RenderFrameObserver events when a new ...
4 years, 8 months ago (2016-04-01 21:03:37 UTC) #22
dcheng
On 2016/04/01 at 21:03:37, meacer wrote: > dcheng, japhet: Can you please comment on the ...
4 years, 8 months ago (2016-04-01 22:26:58 UTC) #23
meacer
On 2016/04/01 22:26:58, dcheng wrote: > On 2016/04/01 at 21:03:37, meacer wrote: > > dcheng, ...
4 years, 8 months ago (2016-04-01 22:37:25 UTC) #24
jochen (gone - plz use gerrit)
On 2016/04/01 at 22:37:25, meacer wrote: > On 2016/04/01 22:26:58, dcheng wrote: > > On ...
4 years, 8 months ago (2016-04-02 08:21:55 UTC) #25
jochen (gone - plz use gerrit)
ah, I see now that DocumentLoader::ensureWriter first creates the writer and then calls FrameLoader::receivedFirstData. I ...
4 years, 8 months ago (2016-04-03 12:50:20 UTC) #26
meacer
On 2016/04/03 12:50:20, jochen wrote: > ah, I see now that DocumentLoader::ensureWriter first creates the ...
4 years, 8 months ago (2016-04-04 06:36:28 UTC) #27
jochen (gone - plz use gerrit)
On 2016/04/04 at 06:36:28, meacer wrote: > On 2016/04/03 12:50:20, jochen wrote: > > ah, ...
4 years, 8 months ago (2016-04-04 12:07:50 UTC) #28
meacer
On 2016/04/04 12:07:50, jochen wrote: > On 2016/04/04 at 06:36:28, meacer wrote: > > On ...
4 years, 8 months ago (2016-04-04 17:26:50 UTC) #29
meacer
On 2016/04/04 17:26:50, Mustafa Emre Acer wrote: > On 2016/04/04 12:07:50, jochen wrote: > > ...
4 years, 8 months ago (2016-04-18 19:18:58 UTC) #30
meacer
4 years, 8 months ago (2016-04-21 17:23:48 UTC) #31

Powered by Google App Engine
This is Rietveld 408576698