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

Unified Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc

Issue 11316163: Remove the last usages of PrefObserver outside of Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index 4c337674a1f417124d0beacef2a05c8d6ce33c25..1fd2058dfca93fe480bd2ad490d291735f41d534 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -102,8 +102,12 @@ CoreChromeOSOptionsHandler::~CoreChromeOSOptionsHandler() {
void CoreChromeOSOptionsHandler::InitializeHandler() {
CoreOptionsHandler::InitializeHandler();
- proxy_prefs_.Init(Profile::FromWebUI(web_ui())->GetPrefs());
- proxy_prefs_.Add(prefs::kProxy, this);
+ PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
+ proxy_prefs_.Init(prefs);
+ proxy_prefs_.Add(prefs::kProxy,
+ base::Bind(&CoreChromeOSOptionsHandler::OnPreferenceChanged,
+ base::Unretained(this),
+ prefs));
// Observe the chromeos::ProxyConfigServiceImpl for changes from the UI.
PrefProxyConfigTracker* proxy_tracker =
Profile::FromWebUI(web_ui())->GetProxyConfigTracker();

Powered by Google App Engine
This is Rietveld 408576698