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

Issue 347793002: Expand the JsonPrefStore's interface to allow for an alternate filename to be specified. (Closed)

Created:
6 years, 6 months ago by gab
Modified:
6 years, 6 months ago
Reviewers:
Bernhard Bauer, sky
CC:
chromium-reviews, erikwright+watch_chromium.org, erikwright (departed), robertshield, Cait (Slow)
Project:
chromium
Visibility:
Public.

Description

Expand the JsonPrefStore's interface to allow for an alternate filename to be specified. The alternate filename is intended to be the old name of the pref file being read, JsonPrefStore handles the migration if required. JsonPrefStore's FileThreadDeserializer is the best place to do this as it's the only code in the prefs stack running on a thread allowed to do IO (another solution would be to let JsonPrefStore take a PreReadOnFileThreadCallback to abstract the required work away, but the direct approach seemed easier here without breaking encapsulation). BUG=372547 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278776

Patch Set 1 #

Total comments: 11

Patch Set 2 : alphabetical order #

Patch Set 3 : Dont even attempt to delete the alternate file in unexpected situations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -13 lines) Patch
M base/prefs/json_pref_store.h View 1 2 2 chunks +15 lines, -3 lines 0 comments Download
M base/prefs/json_pref_store.cc View 1 2 5 chunks +31 lines, -6 lines 0 comments Download
M base/prefs/json_pref_store_unittest.cc View 1 2 3 chunks +203 lines, -1 line 0 comments Download
M chrome/browser/prefs/profile_pref_store_manager.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M chrome/common/chrome_constants.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/chrome_constants.cc View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
gab
Bernhard PTAL. Thanks! Gab
6 years, 6 months ago (2014-06-19 15:23:15 UTC) #1
gab
+sky for chrome_constants.[cc|h] changes.
6 years, 6 months ago (2014-06-19 15:24:42 UTC) #2
Bernhard Bauer
https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could be read from. If |pref_filename| exists, |pref_alternate_filename| ...
6 years, 6 months ago (2014-06-19 15:38:09 UTC) #3
gab
Thanks for the quick review, reply inline. https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could ...
6 years, 6 months ago (2014-06-19 16:03:52 UTC) #4
sky
LGTM https://codereview.chromium.org/347793002/diff/1/chrome/common/chrome_constants.h File chrome/common/chrome_constants.h (right): https://codereview.chromium.org/347793002/diff/1/chrome/common/chrome_constants.h#newcode80 chrome/common/chrome_constants.h:80: extern const base::FilePath::CharType kSecurePreferencesFilename[]; On 2014/06/19 15:38:09, Bernhard ...
6 years, 6 months ago (2014-06-19 16:03:58 UTC) #5
Bernhard Bauer
https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could be read from. If |pref_filename| exists, |pref_alternate_filename| ...
6 years, 6 months ago (2014-06-19 17:20:20 UTC) #6
gab
https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could be read from. If |pref_filename| exists, |pref_alternate_filename| ...
6 years, 6 months ago (2014-06-19 17:50:11 UTC) #7
Bernhard Bauer
https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could be read from. If |pref_filename| exists, |pref_alternate_filename| ...
6 years, 6 months ago (2014-06-20 14:16:29 UTC) #8
gab
Thanks! https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/347793002/diff/1/base/prefs/json_pref_store.h#newcode55 base/prefs/json_pref_store.h:55: // could be read from. If |pref_filename| exists, ...
6 years, 6 months ago (2014-06-20 14:48:28 UTC) #9
gab
The CQ bit was checked by gab@chromium.org
6 years, 6 months ago (2014-06-20 14:48:31 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/347793002/30001
6 years, 6 months ago (2014-06-20 14:50:40 UTC) #11
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 18:29:50 UTC) #12
Message was sent while issue was closed.
Change committed as 278776

Powered by Google App Engine
This is Rietveld 408576698