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

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: Addressed comments 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
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/prefs/value_map_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9447875308cda9edab4cac02359b6f564185aedb 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -356,6 +356,17 @@ bool PrefService::HasPrefPath(const char* path) const {
return pref && !pref->IsDefaultValue();
}
+DictionaryValue* PrefService::GetPreferenceValues() const {
+ DCHECK(CalledOnValidThread());
+ DictionaryValue* out = new DictionaryValue;
+ 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());
+ }
+ return out;
+}
+
const PrefService::Preference* PrefService::FindPreference(
const char* pref_name) const {
DCHECK(CalledOnValidThread());
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698