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

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

Issue 8467012: Refactor proxy handling for ChromeOS to not go through the CrosSettings interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One file slipped away. Created 9 years, 1 month 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.h
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
index 122df379d328410cb11ae397df6bb7d00817bc16..9df1ba2e667062920588f65aefb343d85485f990 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H_
#pragma once
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/webui/options/core_options_handler.h"
class PrefSetObserver;
@@ -21,10 +22,10 @@ class CoreChromeOSOptionsHandler : public CoreOptionsHandler {
protected:
// ::CoreOptionsHandler overrides
virtual void Initialize();
- virtual Value* FetchPref(const std::string& pref_name);
+ virtual base::Value* FetchPref(const std::string& pref_name);
virtual void ObservePref(const std::string& pref_name);
virtual void SetPref(const std::string& pref_name,
- const Value* value,
+ const base::Value* value,
const std::string& metric);
virtual void StopObservingPref(const std::string& path);
@@ -36,12 +37,18 @@ class CoreChromeOSOptionsHandler : public CoreOptionsHandler {
private:
// Notifies registered JS callbacks on ChromeOS setting change.
void NotifySettingsChanged(const std::string* setting_name);
+ void NotifyProxyPrefsChanged();
// Keeps the track of change caused by the handler to make sure
// it does not signal itself again.
bool handling_change_;
+ // Set to true when Initialize was called for this instance and we need to
+ // clean up in the destructor.
+ bool initialized_;
+
scoped_ptr<PrefSetObserver> proxy_prefs_;
+ base::WeakPtrFactory<CoreChromeOSOptionsHandler> pointer_factory_;
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698