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

Issue 901303002: Make SDCH dictionaries persistent across browser restart. (Closed)

Created:
5 years, 10 months ago by Elly Fong-Jones
Modified:
5 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, asvitkine+watch_chromium.org, erikchen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make SDCH dictionaries persistent across browser restart. This CL also adds a generic persistence mechanism for //net, separate from Chrome user preferences, that loads asynchronously on startup (i.e. doesn't block startup). This is a reupload of rdsmith@'s existing CL at https://codereview.chromium.org/881413003/; see that CL for earlier discussion. BUG=374915 R=mmenke@chromium.org R=rdsmith@chromium.org R=bauerb@chromium.org Committed: https://crrev.com/d0ff2559cf187088623898f0b2dd95841123cf6c Cr-Commit-Position: refs/heads/master@{#319753}

Patch Set 1 #

Total comments: 5

Patch Set 2 : rdsmith's original version #

Patch Set 3 : New version #

Patch Set 4 : Fixes for bauerb #

Total comments: 31

Patch Set 5 : More fixes #

Total comments: 69

Patch Set 6 : unit testing intensifies #

Patch Set 7 : More fixes #

Total comments: 15

Patch Set 8 : Fixes for rdsmith #

Total comments: 34

Patch Set 9 : Add field trial #

Patch Set 10 : Bunch of nits fixed. #

Patch Set 11 : Add unit tests for attempted load #

Total comments: 8

Patch Set 12 : Rework attempted_load_ logic in SdchDictionaryFetcher #

Patch Set 13 : Beef up SdchDictionaryFetcher tests #

Total comments: 50

Patch Set 14 : More fixes #

Total comments: 4

Patch Set 15 : Last round #

Total comments: 3

Patch Set 16 : Rebase #

Patch Set 17 : Fix cache control headers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1459 lines, -302 lines) Patch
M DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/sdch_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +31 lines, -0 lines 0 comments Download
M chrome/common/chrome_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_constants.cc View 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/test/data/sdch/dict.mock-http-headers View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M net/sdch/sdch_owner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +69 lines, -7 lines 0 comments Download
M net/sdch/sdch_owner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 13 chunks +516 lines, -69 lines 0 comments Download
M net/sdch/sdch_owner_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 21 chunks +407 lines, -84 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +29 lines, -30 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +154 lines, -58 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 chunks +210 lines, -52 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +23 lines, -1 line 0 comments Download

Messages

Total messages: 59 (13 generated)
Elly Fong-Jones
ptal? :)
5 years, 10 months ago (2015-02-06 16:35:56 UTC) #1
Bernhard Bauer
Could you upload the old version as well, so it's easier to compare them? https://codereview.chromium.org/901303002/diff/1/chrome/browser/profiles/profile_impl_io_data.cc ...
5 years, 10 months ago (2015-02-06 16:40:27 UTC) #2
Elly Fong-Jones
ptal? https://codereview.chromium.org/901303002/diff/1/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/901303002/diff/1/chrome/browser/profiles/profile_impl_io_data.cc#newcode434 chrome/browser/profiles/profile_impl_io_data.cc:434: DCHECK(preference_names.insert(net::SdchOwner::PreferenceName()).second); On 2015/02/06 16:40:27, Bernhard Bauer wrote: > ...
5 years, 10 months ago (2015-02-06 18:44:09 UTC) #3
Bernhard Bauer
Nice! LGTM, with a formatting nit and a question. https://codereview.chromium.org/901303002/diff/1/net/url_request/sdch_dictionary_fetcher.h File net/url_request/sdch_dictionary_fetcher.h (right): https://codereview.chromium.org/901303002/diff/1/net/url_request/sdch_dictionary_fetcher.h#newcode87 net/url_request/sdch_dictionary_fetcher.h:87: ...
5 years, 10 months ago (2015-02-06 20:12:18 UTC) #4
mmenke
I'm happy with SdchOwner now...Haven't taken the time to look at the rest yet, though. ...
5 years, 10 months ago (2015-02-06 22:29:42 UTC) #5
Elly Fong-Jones
ptal? https://codereview.chromium.org/901303002/diff/60001/net/sdch/sdch_owner.cc File net/sdch/sdch_owner.cc (right): https://codereview.chromium.org/901303002/diff/60001/net/sdch/sdch_owner.cc#newcode164 net/sdch/sdch_owner.cc:164: bool IsAtEnd() const { return dictionary_iterator_.IsAtEnd(); } On ...
5 years, 10 months ago (2015-02-11 21:23:51 UTC) #7
mmenke
Hope to continue reviewing this this afternoon - still have more files to look at. ...
5 years, 10 months ago (2015-02-12 16:51:33 UTC) #8
mmenke
https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher.cc#newcode107 net/url_request/sdch_dictionary_fetcher.cc:107: ResetRequest(); I think this is ugly...I have some other ...
5 years, 10 months ago (2015-02-12 20:40:37 UTC) #9
Elly Fong-Jones
There are still two unresolved comments, but I replied pointing out what they are. PTAL ...
5 years, 10 months ago (2015-02-13 23:35:02 UTC) #10
Randy Smith (Not in Mondays)
It's a very weird feeling reviewing one's own code after it's been taken over by ...
5 years, 10 months ago (2015-02-16 01:10:05 UTC) #11
mmenke
https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc File net/url_request/sdch_dictionary_fetcher_unittest.cc (right): https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode295 net/url_request/sdch_dictionary_fetcher_unittest.cc:295: TEST_F(SdchDictionaryFetcherTest, SpecializedCallback) { On 2015/02/16 01:10:04, rdsmith wrote: > ...
5 years, 10 months ago (2015-02-17 16:43:45 UTC) #12
Randy Smith (Not in Mondays)
https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc File net/url_request/sdch_dictionary_fetcher_unittest.cc (right): https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode295 net/url_request/sdch_dictionary_fetcher_unittest.cc:295: TEST_F(SdchDictionaryFetcherTest, SpecializedCallback) { On 2015/02/17 16:43:45, mmenke wrote: > ...
5 years, 10 months ago (2015-02-17 16:53:39 UTC) #13
Elly Fong-Jones
ptal? https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc File net/url_request/sdch_dictionary_fetcher_unittest.cc (right): https://codereview.chromium.org/901303002/diff/80001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode238 net/url_request/sdch_dictionary_fetcher_unittest.cc:238: } On 2015/02/16 01:10:04, rdsmith wrote: > On ...
5 years, 10 months ago (2015-02-17 20:35:30 UTC) #14
Randy Smith (Not in Mondays)
https://codereview.chromium.org/901303002/diff/120001/net/sdch/sdch_owner.cc File net/sdch/sdch_owner.cc (right): https://codereview.chromium.org/901303002/diff/120001/net/sdch/sdch_owner.cc#newcode96 net/sdch/sdch_owner.cc:96: void RecordDictionaryUnload(int use_count) { On 2015/02/17 20:35:29, Elly Jones ...
5 years, 10 months ago (2015-02-17 20:49:36 UTC) #15
Randy Smith (Not in Mondays)
Apologies for the late comments; I made a note to come back to this stuff, ...
5 years, 10 months ago (2015-02-17 20:57:42 UTC) #16
Alexei Svitkine (slow)
histograms LGTM However, unrelated to the histograms review, I think M42 is aimed at being ...
5 years, 10 months ago (2015-02-19 16:25:32 UTC) #18
mmenke
Also worth mentioning that this also adds loading a couple cached SDCH dictionaries into memory ...
5 years, 10 months ago (2015-02-19 16:31:39 UTC) #20
Nico
Has https://code.google.com/p/chromium/issues/detail?id=374915#c10 been addressed somehow? Or is that just baloney? I'm skeptical of us doing ...
5 years, 10 months ago (2015-02-19 16:34:23 UTC) #21
Randy Smith (Not in Mondays)
On 2015/02/19 16:34:23, Nico wrote: > Has https://code.google.com/p/chromium/issues/detail?id=374915#c10 been > addressed somehow? Or is that ...
5 years, 10 months ago (2015-02-19 16:43:10 UTC) #22
Nico
Cool. 387883 wasn't marked fixed when I asked, hence the question. Thanks for updating that ...
5 years, 10 months ago (2015-02-19 17:03:30 UTC) #23
mmenke
https://codereview.chromium.org/901303002/diff/140001/net/sdch/sdch_owner.h File net/sdch/sdch_owner.h (right): https://codereview.chromium.org/901303002/diff/140001/net/sdch/sdch_owner.h#newcode84 net/sdch/sdch_owner.h:84: int GetDictionaryCount() const; On 2015/02/17 20:57:42, rdsmith wrote: > ...
5 years, 10 months ago (2015-02-19 20:14:35 UTC) #24
gab
From a performance P.O.V. I'm mostly okay with this given the read is asynchronous and ...
5 years, 10 months ago (2015-02-19 20:26:39 UTC) #26
Randy Smith (Not in Mondays)
On 2015/02/19 20:26:39, gab wrote: > From a performance P.O.V. I'm mostly okay with this ...
5 years, 10 months ago (2015-02-19 20:39:33 UTC) #27
mmenke
On 2015/02/19 20:39:33, rdsmith wrote: > On 2015/02/19 20:26:39, gab wrote: > > From a ...
5 years, 10 months ago (2015-02-19 20:47:07 UTC) #28
Randy Smith (Not in Mondays)
On 2015/02/19 20:47:07, mmenke wrote: > On 2015/02/19 20:39:33, rdsmith wrote: > > On 2015/02/19 ...
5 years, 10 months ago (2015-02-19 20:56:45 UTC) #29
gab
On 2015/02/19 20:56:45, rdsmith wrote: > On 2015/02/19 20:47:07, mmenke wrote: > > On 2015/02/19 ...
5 years, 10 months ago (2015-02-19 21:11:43 UTC) #30
mmenke
On 2015/02/19 21:11:43, gab wrote: > On 2015/02/19 20:56:45, rdsmith wrote: > > On 2015/02/19 ...
5 years, 10 months ago (2015-02-19 21:17:48 UTC) #31
Nico
Another +1 to "it's done when it's done". Marathon not sprint etc On Thu, Feb ...
5 years, 10 months ago (2015-02-19 21:20:08 UTC) #32
mmenke
https://codereview.chromium.org/901303002/diff/140001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/140001/net/url_request/sdch_dictionary_fetcher.cc#newcode174 net/url_request/sdch_dictionary_fetcher.cc:174: attempted_load_.insert(dictionary_url); On 2015/02/19 20:14:35, mmenke wrote: > Also, if ...
5 years, 10 months ago (2015-02-19 21:44:58 UTC) #33
Elly Fong-Jones
https://codereview.chromium.org/901303002/diff/140001/net/sdch/sdch_owner.cc File net/sdch/sdch_owner.cc (right): https://codereview.chromium.org/901303002/diff/140001/net/sdch/sdch_owner.cc#newcode167 net/sdch/sdch_owner.cc:167: // is iterating over does not export begin()/end() methods. ...
5 years, 10 months ago (2015-02-20 20:35:26 UTC) #35
mmenke
https://codereview.chromium.org/901303002/diff/140001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/140001/net/url_request/sdch_dictionary_fetcher.cc#newcode194 net/url_request/sdch_dictionary_fetcher.cc:194: next_state_ = STATE_SEND_REQUEST; On 2015/02/20 20:35:25, Elly Jones wrote: ...
5 years, 10 months ago (2015-02-20 21:40:00 UTC) #36
mmenke
Quick comments. https://codereview.chromium.org/901303002/diff/200001/net/url_request/sdch_dictionary_fetcher_unittest.cc File net/url_request/sdch_dictionary_fetcher_unittest.cc (right): https://codereview.chromium.org/901303002/diff/200001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode397 net/url_request/sdch_dictionary_fetcher_unittest.cc:397: EXPECT_TRUE(fetcher()->ScheduleReload(dictionary_url, GetDefaultCallback())); This shouldn't happen. https://codereview.chromium.org/901303002/diff/200001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode403 net/url_request/sdch_dictionary_fetcher_unittest.cc:403: ...
5 years, 10 months ago (2015-02-20 21:58:12 UTC) #37
Randy Smith (Not in Mondays)
LGTM. All "suggestions" below are up to you, as it the finch expansion, and looking ...
5 years, 10 months ago (2015-02-23 21:23:49 UTC) #38
mmenke
https://codereview.chromium.org/901303002/diff/240001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/240001/net/url_request/sdch_dictionary_fetcher.cc#newcode51 net/url_request/sdch_dictionary_fetcher.cc:51: GURL url; blank line before url. https://codereview.chromium.org/901303002/diff/240001/net/url_request/sdch_dictionary_fetcher.cc#newcode75 net/url_request/sdch_dictionary_fetcher.cc:75: private: ...
5 years, 10 months ago (2015-02-26 17:27:21 UTC) #39
Elly Fong-Jones
mmenke: ptal? https://codereview.chromium.org/901303002/diff/200001/net/url_request/sdch_dictionary_fetcher_unittest.cc File net/url_request/sdch_dictionary_fetcher_unittest.cc (right): https://codereview.chromium.org/901303002/diff/200001/net/url_request/sdch_dictionary_fetcher_unittest.cc#newcode397 net/url_request/sdch_dictionary_fetcher_unittest.cc:397: EXPECT_TRUE(fetcher()->ScheduleReload(dictionary_url, GetDefaultCallback())); On 2015/02/20 21:58:12, mmenke wrote: ...
5 years, 9 months ago (2015-03-03 21:37:48 UTC) #40
Elly Fong-Jones
mmenke: ptal?
5 years, 9 months ago (2015-03-03 21:42:59 UTC) #41
mmenke
LGTM! https://codereview.chromium.org/901303002/diff/260001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/260001/net/url_request/sdch_dictionary_fetcher.cc#newcode79 net/url_request/sdch_dictionary_fetcher.cc:79: DISALLOW_COPY_AND_ASSIGN(UniqueFetchQueue); nit: Blank line before DISALLOW_COPY_AND_ASSIGN. https://codereview.chromium.org/901303002/diff/260001/net/url_request/sdch_dictionary_fetcher_unittest.cc File ...
5 years, 9 months ago (2015-03-03 21:51:53 UTC) #42
Elly Fong-Jones
https://codereview.chromium.org/901303002/diff/260001/net/url_request/sdch_dictionary_fetcher.cc File net/url_request/sdch_dictionary_fetcher.cc (right): https://codereview.chromium.org/901303002/diff/260001/net/url_request/sdch_dictionary_fetcher.cc#newcode79 net/url_request/sdch_dictionary_fetcher.cc:79: DISALLOW_COPY_AND_ASSIGN(UniqueFetchQueue); On 2015/03/03 21:51:53, mmenke wrote: > nit: Blank ...
5 years, 9 months ago (2015-03-04 15:43:41 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/901303002/280001
5 years, 9 months ago (2015-03-04 15:44:57 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/64410)
5 years, 9 months ago (2015-03-04 15:50:16 UTC) #48
gab
lgtm (w/ a few drive-by nits below), thanks for adding it as an experiment. One ...
5 years, 9 months ago (2015-03-04 16:46:14 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/901303002/300001
5 years, 9 months ago (2015-03-04 18:31:05 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/32361)
5 years, 9 months ago (2015-03-04 23:15:32 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/901303002/320001
5 years, 9 months ago (2015-03-09 19:26:22 UTC) #57
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years, 9 months ago (2015-03-09 22:33:05 UTC) #58
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 22:34:06 UTC) #59
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/d0ff2559cf187088623898f0b2dd95841123cf6c
Cr-Commit-Position: refs/heads/master@{#319753}

Powered by Google App Engine
This is Rietveld 408576698