Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Issue 10055003: Keep emtpy List/Dictionary pref value with non-empty default. (Closed)

Created:
8 years, 8 months ago by xiyuan
Modified:
8 years, 8 months ago
Reviewers:
sky, battre
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Keep emtpy List/Dictionary pref value with non-empty default. - Add a MarkNeedsEmptyValue method to JsonPrefStore; - In PrefService::RegisterPreference, mark ListValue and DictionaryValue pref with non-empty default as needing empty value in |user_pref_store_|; - Update ChromeLauncherDelegate to put back default pinned apps and add migration logic for M19 users; - Add unit tests; BUG=122679 TEST=Verify fix for issue 122679. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131919

Patch Set 1 #

Total comments: 18

Patch Set 2 : for comments in #1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+251 lines, -18 lines) Patch
M chrome/browser/prefs/overlay_user_pref_store.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/prefs/overlay_user_pref_store.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service.cc View 1 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_mock_builder.h View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_mock_builder.cc View 1 chunk +10 lines, -4 lines 0 comments Download
M chrome/browser/prefs/pref_service_unittest.cc View 1 3 chunks +81 lines, -0 lines 0 comments Download
M chrome/browser/prefs/testing_pref_store.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/prefs/testing_pref_store.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc View 1 4 chunks +26 lines, -13 lines 0 comments Download
M chrome/common/json_pref_store.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/common/json_pref_store.cc View 1 2 chunks +28 lines, -0 lines 0 comments Download
M chrome/common/json_pref_store_unittest.cc View 1 2 chunks +48 lines, -1 line 0 comments Download
M chrome/common/persistent_pref_store.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/test/data/pref_service/read.need_empty_value.json View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/pref_service/write.golden.need_empty_value.json View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
xiyuan
battre: Please review all the other changes. sky: if you want, you can just look ...
8 years, 8 months ago (2012-04-11 20:48:42 UTC) #1
battre
http://codereview.chromium.org/10055003/diff/1/chrome/browser/prefs/pref_service.cc File chrome/browser/prefs/pref_service.cc (right): http://codereview.chromium.org/10055003/diff/1/chrome/browser/prefs/pref_service.cc#newcode736 chrome/browser/prefs/pref_service.cc:736: base::ListValue * list = static_cast<base::ListValue*>(default_value); nit: base::ListValue* http://codereview.chromium.org/10055003/diff/1/chrome/browser/prefs/pref_service.cc#newcode736 chrome/browser/prefs/pref_service.cc:736: ...
8 years, 8 months ago (2012-04-11 21:55:50 UTC) #2
xiyuan
CL updated. Please take another look. Thanks. http://codereview.chromium.org/10055003/diff/1/chrome/browser/prefs/pref_service.cc File chrome/browser/prefs/pref_service.cc (right): http://codereview.chromium.org/10055003/diff/1/chrome/browser/prefs/pref_service.cc#newcode736 chrome/browser/prefs/pref_service.cc:736: base::ListValue * ...
8 years, 8 months ago (2012-04-11 22:36:46 UTC) #3
sky
ChromeLauncherDelegate LGTM
8 years, 8 months ago (2012-04-12 00:18:08 UTC) #4
battre
lgtm
8 years, 8 months ago (2012-04-12 01:07:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10055003/5002
8 years, 8 months ago (2012-04-12 01:57:35 UTC) #6
commit-bot: I haz the power
8 years, 8 months ago (2012-04-12 03:41:39 UTC) #7
Change committed as 131919

Powered by Google App Engine
This is Rietveld 408576698