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

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

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/automation/testing_automation_provider.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.h
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index 24b08d27f93ef346a1e8c0fb0dbe7686d247d0a9..d05a1da189a2ea55c37b76edf45f53b07416f18c 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -211,14 +211,9 @@ class PrefService : public base::NonThreadSafe {
// this checks if a value exists for the path.
bool HasPrefPath(const char* path) const;
- class PreferencePathComparator {
- public:
- bool operator() (Preference* lhs, Preference* rhs) const {
- return lhs->name() < rhs->name();
- }
- };
- typedef std::set<Preference*, PreferencePathComparator> PreferenceSet;
- const PreferenceSet& preference_set() const { return prefs_; }
+ // Returns a dictionary with effective preference values. The ownership
+ // is passed to the caller.
+ DictionaryValue* GetPreferenceValues() const;
// A helper method to quickly look up a preference. Returns NULL if the
// preference is not registered.
@@ -248,6 +243,14 @@ class PrefService : public base::NonThreadSafe {
scoped_ptr<PrefNotifierImpl> pref_notifier_;
private:
+ class PreferencePathComparator {
+ public:
+ bool operator() (Preference* lhs, Preference* rhs) const {
+ return lhs->name() < rhs->name();
+ }
+ };
+ typedef std::set<Preference*, PreferencePathComparator> PreferenceSet;
+
friend class PrefServiceMockBuilder;
// Registration of pref change observers must be done using the
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698