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

Issue 6905044: Refactor preference syncing. (Closed)

Created:
9 years, 8 months ago by Nicolas Zea
Modified:
9 years, 7 months ago
CC:
chromium-reviews, GeorgeY, cbentzel+watch_chromium.org, nkostylev+cc_chromium.org, idana, Raghu Simha, Erik does not do reviews, Paweł Hajdan Jr., jam, ncarter (slow), Aaron Boodman, pam+watch_chromium.org, rdsmith+dwatch_chromium.org, brettw-cc_chromium.org, Avi (use Gerrit), darin-cc_chromium.org, Ilya Sherman, amit, davemoore+watch_chromium.org, Joao da Silva
Visibility:
Public.

Description

Refactor preference syncing. The following are the primary changes: 1. Whenever a profile preference is registered, it must specify whether that preference should be synced or not. Local state preferences do not require this. However, we DCHECK that local state preferences are in fact registered to the local state. 2. We've created a new sync model associator interface, which all datatypes will eventually implement. This new model associator is designed to be decoupled from much of the sync internals, and to be owned by the chrome service being synced. It also implements most of the functionality previous handled by the change processor. 3. The PrefService now owns its sync model associator (pref_model_associator), which partially implements the new model associator functionality. Further work will be done to remove the use of sync transactions from the model associator, as well as to migrate other datatypes. BUG=76232 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84603

Patch Set 1 #

Patch Set 2 : Self review #

Total comments: 2

Patch Set 3 : Fix syncing of platform specific prefs #

Total comments: 2

Patch Set 4 : Fix the previous fix #

Total comments: 32

Patch Set 5 : Rebase, refactor, and addressed comments #

Patch Set 6 : Self review #

Total comments: 8

Patch Set 7 : Rebase + comments #

Total comments: 2

Patch Set 8 : Rebase, boolean->enum #

Patch Set 9 : Local state pref callsites no longer use sync status. Added checking for this #

Patch Set 10 : self review #

Patch Set 11 : Fixes #

Patch Set 12 : Really fix. And rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2235 lines, -1894 lines) Patch
M chrome/browser/about_flags_unittest.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/browser/autofill/autofill_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +13 lines, -5 lines 0 comments Download
M chrome/browser/background_contents_service.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_utils.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/audio_mixer_alsa.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/customization_document.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/user_manager.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +83 lines, -38 lines 0 comments Download
M chrome/browser/chromeos/status/input_method_menu.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/user_cros_settings_provider.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -5 lines 0 comments Download
M chrome/browser/content_settings/content_settings_notification_provider.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 1 2 3 4 5 6 7 2 chunks +32 lines, -16 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.cc View 1 2 3 4 5 6 7 2 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/debugger/devtools_manager.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/debugger/devtools_window.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -5 lines 0 comments Download
M chrome/browser/extensions/apps_promo.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_updater.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_web_ui.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extensions_ui.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/first_run/first_run.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/geolocation/geolocation_content_settings_map.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/instant/instant_controller.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -4 lines 0 comments Download
M chrome/browser/instant/promo_counter.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/net/net_pref_observer.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/browser/net/predictor_api.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/net/pref_proxy_config_service.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/net/ssl_config_service_manager_pref.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/password_manager/password_manager.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/password_store_default.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/password_manager/password_store_default_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/password_manager/password_store_win_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/password_manager/password_store_x_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/plugin_updater.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/policy/managed_prefs_banner_base_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/prefs/pref_member_unittest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
A chrome/browser/prefs/pref_model_associator.h View 1 2 3 4 5 6 1 chunk +152 lines, -0 lines 0 comments Download
A chrome/browser/prefs/pref_model_associator.cc View 1 2 3 4 5 6 1 chunk +505 lines, -0 lines 0 comments Download
A + chrome/browser/prefs/pref_model_associator_unittest.cc View 17 chunks +17 lines, -19 lines 0 comments Download
M chrome/browser/prefs/pref_notifier_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_service.h View 1 2 3 4 5 6 7 8 9 chunks +67 lines, -4 lines 0 comments Download
M chrome/browser/prefs/pref_service.cc View 1 2 3 4 5 6 7 8 11 chunks +247 lines, -19 lines 0 comments Download
M chrome/browser/prefs/pref_set_observer_unittest.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/prefs/pref_value_store.h View 1 2 3 4 5 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_value_store.cc View 1 5 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/prefs/pref_value_store_unittest.cc View 1 2 3 4 8 chunks +43 lines, -0 lines 0 comments Download
M chrome/browser/prefs/scoped_user_pref_update_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/session_startup_pref.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/printing/cloud_print/cloud_print_url.cc View 1 2 3 4 5 6 7 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/printing/print_dialog_cloud.cc View 1 2 3 4 5 6 7 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +50 lines, -19 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_model.cc View 1 2 3 4 5 6 7 1 chunk +30 lines, -20 lines 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/browser/sync/abstract_profile_sync_service_test.cc View 2 chunks +1 line, -27 lines 0 comments Download
M chrome/browser/sync/glue/app_data_type_controller.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/bookmark_data_type_controller.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/change_processor.h View 4 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/sync/glue/change_processor.cc View 3 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/extension_data_type_controller.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/frontend_data_type_controller.h View 1 2 3 4 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/frontend_data_type_controller.cc View 1 2 3 4 4 chunks +26 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/frontend_data_type_controller_mock.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/generic_change_processor.h View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/generic_change_processor.cc View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/non_frontend_data_type_controller.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
D chrome/browser/sync/glue/preference_change_processor.h View 1 chunk +0 lines, -71 lines 0 comments Download
D chrome/browser/sync/glue/preference_change_processor.cc View 1 chunk +0 lines, -228 lines 0 comments Download
M chrome/browser/sync/glue/preference_data_type_controller.h View 1 2 3 4 5 2 chunks +14 lines, -5 lines 0 comments Download
M chrome/browser/sync/glue/preference_data_type_controller.cc View 1 2 3 4 5 2 chunks +26 lines, -6 lines 0 comments Download
M chrome/browser/sync/glue/preference_data_type_controller_unittest.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
D chrome/browser/sync/glue/preference_model_associator.h View 1 chunk +0 lines, -135 lines 0 comments Download
D chrome/browser/sync/glue/preference_model_associator.cc View 1 chunk +0 lines, -338 lines 0 comments Download
D chrome/browser/sync/glue/preference_model_associator_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -404 lines 0 comments Download
M chrome/browser/sync/glue/session_data_type_controller.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
D chrome/browser/sync/glue/synchronized_preferences.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -205 lines 0 comments Download
M chrome/browser/sync/glue/theme_data_type_controller.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_factory_impl.cc View 1 2 3 4 4 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 3 chunks +49 lines, -20 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 1 2 3 4 5 6 7 9 chunks +22 lines, -19 lines 0 comments Download
M chrome/browser/sync/signin_manager.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
A chrome/browser/sync/syncable_service.h View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
A chrome/browser/sync/syncable_service.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/browser/sync/syncable_service_mock.h View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/sync/syncable_service_mock.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/tabs/pinned_tab_codec.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/translate/translate_prefs.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 3 chunks +115 lines, -42 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 4 5 6 7 9 10 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.cc View 1 2 3 4 5 6 7 1 chunk +64 lines, -27 lines 0 comments Download
M chrome/browser/ui/views/browser_actions_container.cc View 1 2 3 4 5 6 7 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/most_visited_handler.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/shown_sections_handler.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/extension_settings_handler.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/plugins_ui.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/browser/web_resource/promo_resource_service.cc View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -10 lines 0 comments Download
M chrome/browser/web_resource/web_resource_service.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +6 lines, -5 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -1 line 0 comments Download
M content/browser/host_zoom_map.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Nicolas Zea
Feel free to get get started. Looks like I still have a race I need ...
9 years, 8 months ago (2011-04-27 05:46:20 UTC) #1
dhollowa
http://codereview.chromium.org/6905044/diff/2001/chrome/browser/autofill/autofill_manager.cc File chrome/browser/autofill/autofill_manager.cc (right): http://codereview.chromium.org/6905044/diff/2001/chrome/browser/autofill/autofill_manager.cc#newcode256 chrome/browser/autofill/autofill_manager.cc:256: prefs->RegisterBooleanPref(prefs::kAutofillAuxiliaryProfilesEnabled, This should not be sync'd because it is ...
9 years, 8 months ago (2011-04-27 14:01:16 UTC) #2
tim (not reviewing)
just occurred to me: this is an OWNERS nightmare :\ The only alternative I can ...
9 years, 8 months ago (2011-04-27 19:04:31 UTC) #3
Randy Smith (Not in Mondays)
chrome/browser/download/* LGTM.
9 years, 8 months ago (2011-04-27 20:07:52 UTC) #4
Nicolas Zea
Addressed comment. If you feel the pref shouldn't be syncable on any platform though, feel ...
9 years, 8 months ago (2011-04-27 20:07:57 UTC) #5
dhollowa
LGTM for Autofill. Fine to have this syncing on Mac-only. Thanks. On 2011/04/27 20:07:57, nzea ...
9 years, 8 months ago (2011-04-27 20:32:29 UTC) #6
tim (not reviewing)
Comments on /prefs/. Will tackle /sync/ and friends next. http://codereview.chromium.org/6905044/diff/3154/chrome/browser/prefs/pref_model_associator.h File chrome/browser/prefs/pref_model_associator.h (right): http://codereview.chromium.org/6905044/diff/3154/chrome/browser/prefs/pref_model_associator.h#newcode27 chrome/browser/prefs/pref_model_associator.h:27: ...
9 years, 7 months ago (2011-04-28 21:51:43 UTC) #7
Nicolas Zea
Please take another look. I've refactored to no longer use notifications and to minimize the ...
9 years, 7 months ago (2011-05-03 18:59:36 UTC) #8
tim (not reviewing)
After all the discussions we've had and looking this over a bunch of times I ...
9 years, 7 months ago (2011-05-05 17:45:41 UTC) #9
Nicolas Zea
Done! Will attempt to land tonight. http://codereview.chromium.org/6905044/diff/3154/chrome/browser/prefs/pref_model_associator.h File chrome/browser/prefs/pref_model_associator.h (right): http://codereview.chromium.org/6905044/diff/3154/chrome/browser/prefs/pref_model_associator.h#newcode27 chrome/browser/prefs/pref_model_associator.h:27: class WriteNode; On ...
9 years, 7 months ago (2011-05-06 00:26:43 UTC) #10
Nicolas Zea
Adding you two as reviewers to avoid sending out too many emails to the full ...
9 years, 7 months ago (2011-05-06 03:57:36 UTC) #11
Mattias Nissler (ping if slow)
Looking at the pref parts of the change, I wondered about the following: Nowadays, there ...
9 years, 7 months ago (2011-05-06 04:00:01 UTC) #12
Peter Kasting
Drive-by: Please use an enum instead of a bool. I've tried to add detail to ...
9 years, 7 months ago (2011-05-06 04:26:44 UTC) #13
tim (not reviewing)
http://codereview.chromium.org/6905044/diff/16002/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/6905044/diff/16002/chrome/browser/prefs/pref_service.h#newcode374 chrome/browser/prefs/pref_service.h:374: scoped_ptr<PrefModelAssociator> pref_sync_associator_; On 2011/05/06 04:00:02, Mattias Nissler wrote: > ...
9 years, 7 months ago (2011-05-06 04:27:54 UTC) #14
tim (not reviewing)
And a general PSA to anyone who happens to be reading this review due to ...
9 years, 7 months ago (2011-05-06 04:35:15 UTC) #15
Mattias Nissler (ping if slow)
On 2011/05/06 04:27:54, timsteele wrote: > http://codereview.chromium.org/6905044/diff/16002/chrome/browser/prefs/pref_service.h > File chrome/browser/prefs/pref_service.h (right): > > http://codereview.chromium.org/6905044/diff/16002/chrome/browser/prefs/pref_service.h#newcode374 > ...
9 years, 7 months ago (2011-05-06 16:00:28 UTC) #16
Nicolas Zea
As per our discussions, the following changes have been made. 1. All bool should_sync have ...
9 years, 7 months ago (2011-05-08 02:38:12 UTC) #17
Mattias Nissler (ping if slow)
9 years, 7 months ago (2011-05-08 15:09:19 UTC) #18
LGTM from the pref side of things.

On 2011/05/08 02:38:12, nzea wrote:
> As per our discussions, the following changes have been made.
> 1. All bool should_sync have been converted to a PrefService::PrefSyncStatus
> enum.
> 2. All callsites registering local state prefs now use the old format, and
don't
> require the sync enum (hence about 30 less modified files in this version of
the
> patch), with the exception of:
> - ssl_config_service_manager.cc
> - content_settings_policy_provider.cc
> - cloud_policy_subsystems.cc
> - web_resource_service.cc
> These still use the PrefSyncStatus enum because they actually register the
same
> pref as both a local state pref and a profile pref (from the same callsite).
As
> a result, I defaulted to using the enum. It may be useful to file bugs against
> them to remedy this (I don't know why they would want it so).

I can't speak for all of them, but for the prefs::kPolicyRefreshRate pref, it's
intentionally registered in both namespaces (the user pref might go away soon
though). The same is true for prefs::kProxy. So we'll have to look at these on a
case by case basis. If they intentionally live in both namespaces, we just need
separate registration code paths.

> 3. Added DCHECK's that ensure that any preference registered as a local state
> pref is in fact being registered to the local state. There is a complementary
> dcheck for profile prefs, but due to the four cases above, it's commented out
> with a TODO to bring it back once all prefs are exclusively local or profile
> prefs. I verified with it on that all other profile prefs are in fact profile
> prefs.

Seems some of the trybots fail due to hitting the local_state DCHECK.

> 4. Added comments to try and make the distinction between the registration of
> local state and profile prefs clear.

Thanks!

> 
> Please take a look, and let me know what you think!

Good work and thanks for your patience. Don't hesitate to ping me in case you
want to discuss aspects of the follow-up work.

Powered by Google App Engine
This is Rietveld 408576698