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

Issue 1127963002: Implement lossy pref behavior for JsonPrefStore. (Closed)

Created:
5 years, 7 months ago by raymes
Modified:
5 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@prefs-fix-flags
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement lossy pref behavior for JsonPrefStore. Writes to lossy prefs should not trigger writes to disk to be scheduled. This behavior is implemented for JsonPrefStore. CommitPendingWrites will ensure that all outstanding lossy writes are also written to disk. BUG=476800 Committed: https://crrev.com/e9d8c9882ca272c803711e26ded4dd7d5203a59e Cr-Commit-Position: refs/heads/master@{#329122} Committed: https://crrev.com/4b6e14e878a0cea357943e248e99279a384256bb Cr-Commit-Position: refs/heads/master@{#329287}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 3

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 8

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 4

Patch Set 13 : #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -27 lines) Patch
M base/prefs/json_pref_store.h View 1 2 3 4 4 chunks +7 lines, -0 lines 0 comments Download
M base/prefs/json_pref_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +27 lines, -19 lines 0 comments Download
M base/prefs/json_pref_store_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +127 lines, -8 lines 0 comments Download

Messages

Total messages: 36 (11 generated)
raymes
mnissler: PTAL. This should be the last patch! I will add a test for this ...
5 years, 7 months ago (2015-05-06 03:00:04 UTC) #2
Mattias Nissler (ping if slow)
Approach looks good, happy to stamp this once you have added a test. https://codereview.chromium.org/1127963002/diff/1/base/prefs/json_pref_store.cc File ...
5 years, 7 months ago (2015-05-06 07:26:04 UTC) #3
raymes
Thanks Mattias! I added a test. I created an ImportantFileWriter interface so that it could ...
5 years, 7 months ago (2015-05-07 05:45:41 UTC) #4
Mattias Nissler (ping if slow)
Thanks for adding tests. As commented inline, I don't think mocking out ImportantFileWriter is really ...
5 years, 7 months ago (2015-05-07 07:59:54 UTC) #5
raymes
Thanks Mattias, I don't know what I was thinking. That turned out to be much ...
5 years, 7 months ago (2015-05-08 03:09:58 UTC) #6
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1127963002/diff/80001/base/prefs/json_pref_store_unittest.cc File base/prefs/json_pref_store_unittest.cc (right): https://codereview.chromium.org/1127963002/diff/80001/base/prefs/json_pref_store_unittest.cc#newcode815 base/prefs/json_pref_store_unittest.cc:815: struct PrefDetails { This is still here, but I ...
5 years, 7 months ago (2015-05-08 07:04:25 UTC) #7
raymes
Thanks! https://codereview.chromium.org/1127963002/diff/80001/base/prefs/json_pref_store_unittest.cc File base/prefs/json_pref_store_unittest.cc (right): https://codereview.chromium.org/1127963002/diff/80001/base/prefs/json_pref_store_unittest.cc#newcode815 base/prefs/json_pref_store_unittest.cc:815: struct PrefDetails { I removed this. https://codereview.chromium.org/1127963002/diff/80001/base/prefs/json_pref_store_unittest.cc#newcode888 base/prefs/json_pref_store_unittest.cc:888: ...
5 years, 7 months ago (2015-05-11 00:57:27 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1127963002/120001
5 years, 7 months ago (2015-05-11 00:59:20 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/23347)
5 years, 7 months ago (2015-05-11 01:42:59 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1127963002/140001
5 years, 7 months ago (2015-05-11 05:22:06 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/82232)
5 years, 7 months ago (2015-05-11 06:54:27 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1127963002/160001
5 years, 7 months ago (2015-05-11 07:15:13 UTC) #18
Mattias Nissler (ping if slow)
LGTM https://codereview.chromium.org/1127963002/diff/140001/base/prefs/json_pref_store_unittest.cc File base/prefs/json_pref_store_unittest.cc (right): https://codereview.chromium.org/1127963002/diff/140001/base/prefs/json_pref_store_unittest.cc#newcode897 base/prefs/json_pref_store_unittest.cc:897: ASSERT_FALSE(file_writer->HasPendingWrite()); suggestion: blank line before comment https://codereview.chromium.org/1127963002/diff/140001/base/prefs/json_pref_store_unittest.cc#newcode901 base/prefs/json_pref_store_unittest.cc:901: ...
5 years, 7 months ago (2015-05-11 07:17:10 UTC) #19
raymes
https://codereview.chromium.org/1127963002/diff/140001/base/prefs/json_pref_store_unittest.cc File base/prefs/json_pref_store_unittest.cc (right): https://codereview.chromium.org/1127963002/diff/140001/base/prefs/json_pref_store_unittest.cc#newcode897 base/prefs/json_pref_store_unittest.cc:897: ASSERT_FALSE(file_writer->HasPendingWrite()); On 2015/05/11 07:17:10, Mattias Nissler wrote: > suggestion: ...
5 years, 7 months ago (2015-05-11 07:35:07 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1127963002/220001
5 years, 7 months ago (2015-05-11 07:40:18 UTC) #23
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 7 months ago (2015-05-11 08:43:03 UTC) #24
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/e9d8c9882ca272c803711e26ded4dd7d5203a59e Cr-Commit-Position: refs/heads/master@{#329122}
5 years, 7 months ago (2015-05-11 08:44:28 UTC) #25
robert.bradford
https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc#newcode180 base/prefs/json_pref_store.cc:180: filtering_in_progress_(false), I think you're missing doing "pending_lossy_write_(false)" here. Which ...
5 years, 7 months ago (2015-05-11 17:12:08 UTC) #26
robert.bradford
A revert of this CL (patchset #12 id:220001) has been created in https://codereview.chromium.org/1136983004/ by robert.bradford@intel.com. ...
5 years, 7 months ago (2015-05-11 17:14:32 UTC) #27
Dan Beam
https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc#newcode180 base/prefs/json_pref_store.cc:180: filtering_in_progress_(false), On 2015/05/11 17:12:08, robert.bradford wrote: > I think ...
5 years, 7 months ago (2015-05-11 17:31:26 UTC) #29
raymes
https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc#newcode180 base/prefs/json_pref_store.cc:180: filtering_in_progress_(false), Thanks guys (especially Dan for trying to fix ...
5 years, 7 months ago (2015-05-11 22:59:08 UTC) #30
Dan Beam
https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/1127963002/diff/220001/base/prefs/json_pref_store.cc#newcode180 base/prefs/json_pref_store.cc:180: filtering_in_progress_(false), On 2015/05/11 22:59:08, raymes wrote: > Thanks guys ...
5 years, 7 months ago (2015-05-11 23:01:23 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1127963002/260001
5 years, 7 months ago (2015-05-11 23:17:20 UTC) #34
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 7 months ago (2015-05-12 00:10:39 UTC) #35
commit-bot: I haz the power
5 years, 7 months ago (2015-05-12 00:11:27 UTC) #36
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/4b6e14e878a0cea357943e248e99279a384256bb
Cr-Commit-Position: refs/heads/master@{#329287}

Powered by Google App Engine
This is Rietveld 408576698