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

Unified Diff: chrome/browser/prefs/pref_service.cc

Issue 6353015: Fix broken PrefService::preference_set() returning not all registered preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months 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/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 2ab04f89704f96059a3865a67e7bf74fe2f95917..e0b9703ca76527631b4ba3e5d0313068bf803814 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -356,6 +356,15 @@ bool PrefService::HasPrefPath(const char* path) const {
return pref && !pref->IsDefaultValue();
}
+void PrefService::GetPreferenceValues(DictionaryValue* out) const {
+ DCHECK(CalledOnValidThread());
+ DefaultPrefStore::const_iterator i = default_store_->begin();
+ for (; i != default_store_->end(); ++i) {
+ const Value* value = FindPreference(i->first.c_str())->GetValue();
+ out->Set(i->first, value->DeepCopy());
Mattias Nissler (ping if slow) 2011/01/26 17:55:11 So here is the problem that Set splits up the path
battre 2011/01/27 09:53:27 This is what the currently only consumer expects t
+ }
+}
+
const PrefService::Preference* PrefService::FindPreference(
const char* pref_name) const {
DCHECK(CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698