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

Issue 2084093002: Use lossy prefs in the net predictor, and update them more frequently (Closed)

Created:
4 years, 6 months ago by Charlie Harrison
Modified:
4 years, 4 months ago
Reviewers:
Bernhard Bauer, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke, eroman
Base URL:
https://chromium.googlesource.com/chromium/src.git@predictor_lru
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use lossy prefs in the net predictor, and update them more frequently This patch changes the predictor to use lossy prefs to sync referrer lists, and updates them upon receiving the load event from a main frame document. This fixes an issue where prefs are not updated on unclean shutdown, and a hang during a synchronous thread hop roundtrip. BUG=78451, 621604 Committed: https://crrev.com/ee45633faa3fae0320db4b630ec24221e930478e Cr-Commit-Position: refs/heads/master@{#409017}

Patch Set 1 #

Patch Set 2 : Use lossy prefs in the net predictor, and update them more frequently #

Patch Set 3 : Fix browser tests #

Total comments: 10

Patch Set 4 : Make saving prefs a little saner and a little insaner #

Total comments: 4

Patch Set 5 : weak factory invalidation + cleanups and comments #

Patch Set 6 : ui thread weak factory :/ #

Total comments: 8

Patch Set 7 : bauerb@ review #

Total comments: 5

Patch Set 8 : Don't initialize lists to save with the old values! #

Patch Set 9 : update unit tests for new API #

Total comments: 4

Patch Set 10 : kill waitable event references #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -80 lines) Patch
M chrome/browser/net/predictor.h View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -8 lines 0 comments Download
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 11 chunks +43 lines, -63 lines 0 comments Download
M chrome/browser/net/predictor_browsertest.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/net/predictor_tab_helper.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/net/predictor_tab_helper.cc View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/net/predictor_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 chunks +0 lines, -7 lines 0 comments Download

Messages

Total messages: 54 (35 generated)
Charlie Harrison
bauerb@, do you mind taking a look at this? I'm still a bit unsure about ...
4 years, 4 months ago (2016-07-28 22:07:54 UTC) #8
Bernhard Bauer
On 2016/07/28 22:07:54, csharrison wrote: > bauerb@, do you mind taking a look at this? ...
4 years, 4 months ago (2016-07-29 11:07:53 UTC) #11
Charlie Harrison
Thanks for the review. I'm still a bit stuck on the best path forward for ...
4 years, 4 months ago (2016-07-29 13:42:14 UTC) #12
Bernhard Bauer
https://codereview.chromium.org/2084093002/diff/40001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/40001/chrome/browser/net/predictor.cc#newcode687 chrome/browser/net/predictor.cc:687: ListPrefUpdate* update_startup_list = On 2016/07/29 13:42:13, csharrison wrote: > ...
4 years, 4 months ago (2016-07-29 14:08:14 UTC) #15
Charlie Harrison
PTAL at the latest patch set, which adds a UI thread weak pointer factory. See ...
4 years, 4 months ago (2016-07-29 16:50:12 UTC) #22
Charlie Harrison
cc eroman@ if you want to take a look.
4 years, 4 months ago (2016-07-29 17:06:24 UTC) #23
Bernhard Bauer
LGTM with some last nits. I don't think using a second weak pointer factory is ...
4 years, 4 months ago (2016-08-01 09:06:25 UTC) #26
Charlie Harrison
Thanks a lot. I feel a lot better about this change now. +mmenke explicitly for ...
4 years, 4 months ago (2016-08-01 12:38:25 UTC) #30
mmenke
https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc#newcode689 chrome/browser/net/predictor.cc:689: user_prefs_->GetList(prefs::kDnsPrefetchingStartupList)->DeepCopy()); I'm not following this code. WriteDnsPrefetchState calls GetInitialDnsResolutionList, ...
4 years, 4 months ago (2016-08-01 15:11:20 UTC) #33
Bernhard Bauer
https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc#newcode689 chrome/browser/net/predictor.cc:689: user_prefs_->GetList(prefs::kDnsPrefetchingStartupList)->DeepCopy()); On 2016/08/01 15:11:20, mmenke wrote: > I'm not ...
4 years, 4 months ago (2016-08-01 15:18:52 UTC) #34
Charlie Harrison
https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc#newcode689 chrome/browser/net/predictor.cc:689: user_prefs_->GetList(prefs::kDnsPrefetchingStartupList)->DeepCopy()); On 2016/08/01 15:18:52, Bernhard Bauer wrote: > On ...
4 years, 4 months ago (2016-08-01 15:20:03 UTC) #35
mmenke
https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc#newcode689 chrome/browser/net/predictor.cc:689: user_prefs_->GetList(prefs::kDnsPrefetchingStartupList)->DeepCopy()); On 2016/08/01 15:20:03, csharrison wrote: > On 2016/08/01 ...
4 years, 4 months ago (2016-08-01 15:27:48 UTC) #36
Charlie Harrison
https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/120001/chrome/browser/net/predictor.cc#newcode689 chrome/browser/net/predictor.cc:689: user_prefs_->GetList(prefs::kDnsPrefetchingStartupList)->DeepCopy()); On 2016/08/01 15:27:48, mmenke wrote: > On 2016/08/01 ...
4 years, 4 months ago (2016-08-01 15:34:23 UTC) #37
Charlie Harrison
Okay I've updated the CL. Matt, PTAL thanks again.
4 years, 4 months ago (2016-08-01 17:37:37 UTC) #46
mmenke
LGTM! https://codereview.chromium.org/2084093002/diff/160001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/160001/chrome/browser/net/predictor.cc#newcode26 chrome/browser/net/predictor.cc:26: #include "base/synchronization/waitable_event.h" Header no longer needed. https://codereview.chromium.org/2084093002/diff/160001/chrome/browser/net/predictor.h File ...
4 years, 4 months ago (2016-08-01 17:41:26 UTC) #47
Charlie Harrison
Thanks! https://codereview.chromium.org/2084093002/diff/160001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2084093002/diff/160001/chrome/browser/net/predictor.cc#newcode26 chrome/browser/net/predictor.cc:26: #include "base/synchronization/waitable_event.h" On 2016/08/01 17:41:25, mmenke wrote: > ...
4 years, 4 months ago (2016-08-01 17:48:09 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2084093002/180001
4 years, 4 months ago (2016-08-01 17:48:43 UTC) #51
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2016-08-01 19:20:24 UTC) #52
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 19:23:38 UTC) #54
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/ee45633faa3fae0320db4b630ec24221e930478e
Cr-Commit-Position: refs/heads/master@{#409017}

Powered by Google App Engine
This is Rietveld 408576698