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

Issue 11316163: Remove the last usages of PrefObserver outside of Prefs. (Closed)

Created:
8 years ago by Jói
Modified:
8 years ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, dhollowa+watch_chromium.org, rpetterson, browser-components-watch_chromium.org, stuartmorgan+watch_chromium.org, ajwong+watch_chromium.org, stevenjb+watch_chromium.org, cbentzel+watch_chromium.org, Ilya Sherman, jam, dbeam+watch-autofill_chromium.org, darin-cc_chromium.org, groby+spellwatch_chromium.org, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org, tim (not reviewing), dbeam+watch-options_chromium.org, Avi (use Gerrit), creis+watch_chromium.org, dyu1, Raghu Simha, oshima+watch_chromium.org, Albert Bodenhamer, haitaol1, akalin, Aaron Boodman, rdsmith+dwatch_chromium.org, estade+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Remove the last usages of PrefObserver outside of Prefs. This involved: a) Removing methods that used PrefObserver from PrefChangeRegistrar and PrefMember. b) Removing implementation of PrefObserver from a few remaining classes. c) Removing NULL PrefObserver parameter for classes using PrefMember but not wishing for a callback. d) Updating unit tests and test utility classes. Also fixed what was most likely a bug (or at least an unintentional change in behavior) that I had introduced in CoreChromeOSOptionsHandler in a previous change. Before my series of PrefObserver-related changes, there was polymorphism involved and the subclass was only handling pref changes for a couple of preferences (kProxy and kUseSharedProxy, only one of which it registers for itself) if the PrefService was the standard one, not the incognito one, otherwise delegating to the parent class. [email protected] BUG=155525 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171002

Patch Set 1 #

Patch Set 2 : Merge LKGR #

Patch Set 3 : First working version. #

Patch Set 4 : Fix Aura build. #

Patch Set 5 : Fix Win and CrOS build. #

Total comments: 18

Patch Set 6 : Fix build. #

Total comments: 4

Patch Set 7 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -320 lines) Patch
M base/prefs/public/pref_change_registrar.h View 1 chunk +0 lines, -3 lines 0 comments Download
M base/prefs/public/pref_change_registrar.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M base/prefs/public/pref_change_registrar_unittest.cc View 1 2 3 4 5 6 6 chunks +27 lines, -36 lines 0 comments Download
M chrome/browser/api/prefs/pref_member.h View 1 2 3 4 5 6 3 chunks +2 lines, -12 lines 0 comments Download
M chrome/browser/api/prefs/pref_member.cc View 1 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/api/prefs/pref_member_unittest.cc View 1 2 8 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/autofill/autocomplete_history_manager.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/input_method/browser_state_monitor_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/preferences_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/proxy_config_service_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/download/save_package_file_picker.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 2 chunks +17 lines, -17 lines 0 comments Download
M chrome/browser/net/chrome_http_user_agent_settings.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/net/net_error_tab_helper.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/password_manager/password_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugins/plugin_status_pref_setter.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/plugins/plugin_status_pref_setter.cc View 1 chunk +3 lines, -2 lines 0 comments Download
A + chrome/browser/prefs/mock_pref_change_callback.h View 1 2 3 4 5 6 2 chunks +14 lines, -10 lines 0 comments Download
A chrome/browser/prefs/mock_pref_change_callback.cc View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_notifier_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_observer_mock.h View 1 2 1 chunk +0 lines, -48 lines 0 comments Download
M chrome/browser/prefs/pref_observer_mock.cc View 1 2 1 chunk +0 lines, -17 lines 0 comments Download
M chrome/browser/prefs/pref_service_unittest.cc View 1 2 3 4 5 6 9 chunks +37 lines, -35 lines 0 comments Download
M chrome/browser/prefs/scoped_user_pref_update_unittest.cc View 1 2 6 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/plugin_info_message_filter.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_service.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/tab_contents/spelling_menu_observer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/event_rewriter_unittest.cc View 1 2 3 4 5 16 chunks +17 lines, -17 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm View 1 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/gesture_prefs_observer_factory_aura.cc View 1 2 3 5 chunks +7 lines, -14 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/extensions/disabled_extensions_view.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/options/core_options_handler.h View 1 2 3 4 5 6 4 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/options/core_options_handler.cc View 2 chunks +20 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/options/font_settings_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/plugins_ui.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Jói
Finally! Last week was a bit of a wash for me, I was away 3 ...
8 years ago (2012-12-03 16:44:34 UTC) #1
Mattias Nissler (ping if slow)
Here's a half-pass from yesterday night, I'll take a look at the updated version now. ...
8 years ago (2012-12-04 10:10:33 UTC) #2
Mattias Nissler (ping if slow)
Here are the remaining comments (only nits). https://codereview.chromium.org/11316163/diff/10004/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/11316163/diff/10004/chrome/browser/profiles/profile_io_data.cc#newcode209 chrome/browser/profiles/profile_io_data.cc:209: google_services_username_.Init(prefs::kGoogleServicesUsername, pref_service); ...
8 years ago (2012-12-04 10:47:11 UTC) #3
Mattias Nissler (ping if slow)
Here are the remaining comments (only nits). https://codereview.chromium.org/11316163/diff/10004/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/11316163/diff/10004/chrome/browser/profiles/profile_io_data.cc#newcode209 chrome/browser/profiles/profile_io_data.cc:209: google_services_username_.Init(prefs::kGoogleServicesUsername, pref_service); ...
8 years ago (2012-12-04 10:47:12 UTC) #4
Jói
Thanks Mattias, I've addressed your comments and uploaded a new patch. Cheers, Jói https://codereview.chromium.org/11316163/diff/5045/base/prefs/public/pref_change_registrar_unittest.cc File ...
8 years ago (2012-12-04 10:55:56 UTC) #5
Mattias Nissler (ping if slow)
LGTM w/ one question regarding premature optimization ;) And, finally: Thanks so much for all ...
8 years ago (2012-12-04 11:18:33 UTC) #6
Jói
https://codereview.chromium.org/11316163/diff/5045/chrome/browser/api/prefs/pref_member.h File chrome/browser/api/prefs/pref_member.h (right): https://codereview.chromium.org/11316163/diff/5045/chrome/browser/api/prefs/pref_member.h#newcode106 chrome/browser/api/prefs/pref_member.h:106: void Init(const char* pref_name, PrefServiceBase* prefs); On 2012/12/04 11:18:33, ...
8 years ago (2012-12-04 11:42:26 UTC) #7
Jói
Mattias, you may have missed this as you already gave your LGTM, but I'd like ...
8 years ago (2012-12-04 15:11:16 UTC) #8
Mattias Nissler (ping if slow)
LGTM, I just failed to submit my reply :-/ Sorry for that. Also, a big ...
8 years ago (2012-12-04 15:24:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11316163/12055
8 years ago (2012-12-04 15:30:19 UTC) #10
Jói
Thanks :) The end result is certainly better than what we had. In retrospect, I ...
8 years ago (2012-12-04 15:30:38 UTC) #11
commit-bot: I haz the power
Presubmit check for 11316163-12055 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-04 15:30:51 UTC) #12
Jói
[email protected] for usage updates (mostly removing NULL parameter from PrefMember::Init, plus switching over a couple ...
8 years ago (2012-12-04 15:32:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11316163/12055
8 years ago (2012-12-04 15:34:33 UTC) #14
Ben Goodger (Google)
lgtm
8 years ago (2012-12-04 16:24:07 UTC) #15
commit-bot: I haz the power
8 years ago (2012-12-04 18:14:09 UTC) #16
Message was sent while issue was closed.
Change committed as 171002

Powered by Google App Engine
This is Rietveld 408576698