summaryrefslogtreecommitdiffstats
path: root/chromium/base/prefs/pref_registry_simple.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/prefs/pref_registry_simple.cc')
-rw-r--r--chromium/base/prefs/pref_registry_simple.cc137
1 files changed, 116 insertions, 21 deletions
diff --git a/chromium/base/prefs/pref_registry_simple.cc b/chromium/base/prefs/pref_registry_simple.cc
index 7453016a272..93c268686d5 100644
--- a/chromium/base/prefs/pref_registry_simple.cc
+++ b/chromium/base/prefs/pref_registry_simple.cc
@@ -14,53 +14,148 @@ PrefRegistrySimple::PrefRegistrySimple() {
PrefRegistrySimple::~PrefRegistrySimple() {
}
-void PrefRegistrySimple::RegisterBooleanPref(const char* path,
+void PrefRegistrySimple::RegisterBooleanPref(const std::string& path,
bool default_value) {
- RegisterPreference(path, new base::FundamentalValue(default_value));
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value),
+ NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterIntegerPref(const char* path,
+void PrefRegistrySimple::RegisterIntegerPref(const std::string& path,
int default_value) {
- RegisterPreference(path, new base::FundamentalValue(default_value));
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value),
+ NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterDoublePref(const char* path,
+void PrefRegistrySimple::RegisterDoublePref(const std::string& path,
double default_value) {
- RegisterPreference(path, new base::FundamentalValue(default_value));
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value),
+ NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterStringPref(const char* path,
+void PrefRegistrySimple::RegisterStringPref(const std::string& path,
const std::string& default_value) {
- RegisterPreference(path, new base::StringValue(default_value));
+ RegisterPrefAndNotify(path, new base::StringValue(default_value),
+ NO_REGISTRATION_FLAGS);
}
void PrefRegistrySimple::RegisterFilePathPref(
- const char* path,
+ const std::string& path,
const base::FilePath& default_value) {
- RegisterPreference(path, new base::StringValue(default_value.value()));
+ RegisterPrefAndNotify(path, new base::StringValue(default_value.value()),
+ NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterListPref(const char* path) {
- RegisterPreference(path, new base::ListValue());
+void PrefRegistrySimple::RegisterListPref(const std::string& path) {
+ RegisterPrefAndNotify(path, new base::ListValue(), NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterListPref(const char* path,
+void PrefRegistrySimple::RegisterListPref(const std::string& path,
base::ListValue* default_value) {
- RegisterPreference(path, default_value);
+ RegisterPrefAndNotify(path, default_value, NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterDictionaryPref(const char* path) {
- RegisterPreference(path, new base::DictionaryValue());
+void PrefRegistrySimple::RegisterDictionaryPref(const std::string& path) {
+ RegisterPrefAndNotify(path, new base::DictionaryValue(),
+ NO_REGISTRATION_FLAGS);
}
void PrefRegistrySimple::RegisterDictionaryPref(
- const char* path,
+ const std::string& path,
base::DictionaryValue* default_value) {
- RegisterPreference(path, default_value);
+ RegisterPrefAndNotify(path, default_value, NO_REGISTRATION_FLAGS);
}
-void PrefRegistrySimple::RegisterInt64Pref(const char* path,
+void PrefRegistrySimple::RegisterInt64Pref(const std::string& path,
int64 default_value) {
- RegisterPreference(
- path, new base::StringValue(base::Int64ToString(default_value)));
+ RegisterPrefAndNotify(
+ path, new base::StringValue(base::Int64ToString(default_value)),
+ NO_REGISTRATION_FLAGS);
+}
+
+void PrefRegistrySimple::RegisterUint64Pref(const std::string& path,
+ uint64 default_value) {
+ RegisterPrefAndNotify(
+ path, new base::StringValue(base::Uint64ToString(default_value)),
+ NO_REGISTRATION_FLAGS);
+}
+
+void PrefRegistrySimple::RegisterBooleanPref(const std::string& path,
+ bool default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
+}
+
+void PrefRegistrySimple::RegisterIntegerPref(const std::string& path,
+ int default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
+}
+
+void PrefRegistrySimple::RegisterDoublePref(const std::string& path,
+ double default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
+}
+
+void PrefRegistrySimple::RegisterStringPref(const std::string& path,
+ const std::string& default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::StringValue(default_value), flags);
+}
+
+void PrefRegistrySimple::RegisterFilePathPref(
+ const std::string& path,
+ const base::FilePath& default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::StringValue(default_value.value()),
+ flags);
+}
+
+void PrefRegistrySimple::RegisterListPref(const std::string& path,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::ListValue(), flags);
+}
+
+void PrefRegistrySimple::RegisterListPref(const std::string& path,
+ base::ListValue* default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, default_value, flags);
+}
+
+void PrefRegistrySimple::RegisterDictionaryPref(const std::string& path,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, new base::DictionaryValue(), flags);
+}
+
+void PrefRegistrySimple::RegisterDictionaryPref(
+ const std::string& path,
+ base::DictionaryValue* default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(path, default_value, flags);
+}
+
+void PrefRegistrySimple::RegisterInt64Pref(const std::string& path,
+ int64 default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(
+ path, new base::StringValue(base::Int64ToString(default_value)), flags);
+}
+
+void PrefRegistrySimple::RegisterUint64Pref(const std::string& path,
+ uint64 default_value,
+ uint32 flags) {
+ RegisterPrefAndNotify(
+ path, new base::StringValue(base::Uint64ToString(default_value)), flags);
+}
+
+void PrefRegistrySimple::OnPrefRegistered(const std::string& path,
+ base::Value* default_value,
+ uint32 flags) {
+}
+
+void PrefRegistrySimple::RegisterPrefAndNotify(const std::string& path,
+ base::Value* default_value,
+ uint32 flags) {
+ RegisterPreference(path, default_value, flags);
+ OnPrefRegistered(path, default_value, flags);
}