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

Issue 12315053: Fix prefs registration in SyncPrefs. (Closed)

Created:
7 years, 10 months ago by Jói
Modified:
7 years, 10 months ago
CC:
chromium-reviews, akalin, Raghu Simha, sail+watch_chromium.org, Aaron Boodman, chromium-apps-reviews_chromium.org, markusheintz_, haitaol1, tim (not reviewing), ncarter (slow)
Visibility:
Public.

Description

Fix prefs registration in SyncPrefs. All preferences should be registered _before_ a PrefService is created, so reading other prefs during registration is a no-no. The previous code dynamically set a default for the kSyncKeepEverythingSynced preference and for each data type preference dynamically based on whether or not sync setup is complete, but during sync setup each of these would be explicitly set anyway, overriding the default. The one complexity is that there is code in ProfileSyncService::TrySyncDatatypePrefRecovery that attempts to recover from an old bug, and it depends on checking whether the value is default. We remove one of the checks it used, which was redundant (the needed check is just whether the pref is still at its default value, regardless of that default value). TBR=ben@chromium.org BUG=155525 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=184800

Patch Set 1 #

Patch Set 2 : Comment change. #

Total comments: 4

Patch Set 3 : Move call to Profile::RegisterUserPrefs into browser_prefs.cc #

Patch Set 4 : Update to not depend on BrowserInstantController change. #

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -28 lines) Patch
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/policy/user_policy_signin_service_unittest.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 3 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/sync_prefs.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/sync_prefs.cc View 1 3 chunks +6 lines, -14 lines 0 comments Download
M chrome/browser/sync/sync_prefs_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
Jói
nick: chrome/browser/sync mnissler: entire change NOTE: I'm not 100% sure this is correct. Nick, would ...
7 years, 10 months ago (2013-02-22 15:35:05 UTC) #1
Mattias Nissler (ping if slow)
LGTM in general, I haven't checked the subtleties of the sync default changes though, deferring ...
7 years, 10 months ago (2013-02-22 15:44:32 UTC) #2
Jói
Thanks Mattias. Will await Nick's feedback for the rest. Cheers, Jói https://codereview.chromium.org/12315053/diff/3001/chrome/browser/prefs/browser_prefs.cc File chrome/browser/prefs/browser_prefs.cc (right): ...
7 years, 10 months ago (2013-02-22 16:08:07 UTC) #3
ncarter (slow)
rlarocque, timsteele, or zea would be a better reviewer than me. Routing to Richard.
7 years, 10 months ago (2013-02-22 17:38:17 UTC) #4
rlarocque
Unfortunately, I don't know this area well enough to review these changes. I think Nicolas ...
7 years, 10 months ago (2013-02-22 21:50:08 UTC) #5
Jói
Thanks. If this needs to wait until Monday that's fine. Cheers, Jói On Fri, Feb ...
7 years, 10 months ago (2013-02-22 21:52:23 UTC) #6
Nicolas Zea
sync LGTM
7 years, 10 months ago (2013-02-25 23:58:37 UTC) #7
Jói
Thanks guys. FYI, the latest patch set has a small change to browser_prefs.cc and callers ...
7 years, 10 months ago (2013-02-26 14:48:45 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/12315053/10012
7 years, 10 months ago (2013-02-26 22:18:00 UTC) #9
commit-bot: I haz the power
Presubmit check for 12315053-10012 failed and returned exit status 1. INFO:root:Found 10 file(s). Running presubmit ...
7 years, 10 months ago (2013-02-26 22:18:07 UTC) #10
Jói
TBR=ben@chromium.org for Prefs-related updates across codebase, already reviewed by mnissler@ for Prefs OWNERS.
7 years, 10 months ago (2013-02-26 22:20:02 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/12315053/10012
7 years, 10 months ago (2013-02-26 22:23:36 UTC) #12
commit-bot: I haz the power
7 years, 10 months ago (2013-02-27 00:42:01 UTC) #13
Message was sent while issue was closed.
Change committed as 184800

Powered by Google App Engine
This is Rietveld 408576698