Index: chrome/browser/ui/webui/options/core_options_handler.h |
=================================================================== |
--- chrome/browser/ui/webui/options/core_options_handler.h (revision 108608) |
+++ chrome/browser/ui/webui/options/core_options_handler.h (working copy) |
@@ -12,6 +12,7 @@ |
#include "base/values.h" |
#include "chrome/browser/plugin_data_remover_helper.h" |
#include "chrome/browser/prefs/pref_change_registrar.h" |
+#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/ui/webui/options/options_ui.h" |
// Core options UI handler. |
@@ -66,8 +67,23 @@ |
void ProcessUserMetric(const Value* value, |
const std::string& metric); |
+ // Notifies registered JS callbacks on change in |pref_name| preference. |
+ // |controlling_pref_name| controls if |pref_name| is managed by |
+ // policy/extension; empty |controlling_pref_name| indicates no other pref is |
+ // controlling |pref_name|. |
+ void NotifyPrefChanged(const std::string& pref_name, |
+ const std::string& controlling_pref_name); |
+ |
+ // Creates dictionary value for |pref|, |controlling_pref| controls if |pref| |
+ // is managed by policy/extension; NULL indicates no other pref is controlling |
+ // |pref|. |
+ DictionaryValue* CreateValueForPref( |
+ const PrefService::Preference* pref, |
+ const PrefService::Preference* controlling_pref); |
+ |
typedef std::multimap<std::string, std::wstring> PreferenceCallbackMap; |
PreferenceCallbackMap pref_callback_map_; |
+ |
private: |
// Type of preference value received from the page. This doesn't map 1:1 to |
// Value::Type, since a TYPE_STRING can require custom processing. |
@@ -122,8 +138,6 @@ |
void UpdateClearPluginLSOData(); |
- void NotifyPrefChanged(const std::string* pref_name); |
- |
OptionsPageUIHandlerHost* handlers_host_; |
PrefChangeRegistrar registrar_; |