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

Unified Diff: base/prefs/default_pref_store.h

Issue 11358123: Rewrite DefaultPrefStore for performance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review changes Created 8 years, 1 month 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 | « no previous file | base/prefs/default_pref_store.cc » ('j') | base/prefs/default_pref_store.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/default_pref_store.h
diff --git a/base/prefs/default_pref_store.h b/base/prefs/default_pref_store.h
index 3226cc2ae33c7306bb3fdd2c5d2ebd302ccde90d..e6fdbfacab706f18ce62a2a6ff5ab5f6f80266d3 100644
--- a/base/prefs/default_pref_store.h
+++ b/base/prefs/default_pref_store.h
@@ -8,15 +8,21 @@
#include <string>
#include "base/prefs/base_prefs_export.h"
-#include "base/prefs/value_map_pref_store.h"
+#include "base/prefs/pref_store.h"
+#include "base/prefs/pref_value_map.h"
#include "base/values.h"
// This PrefStore keeps track of default preference values set when a
// preference is registered with the PrefService.
-class BASE_PREFS_EXPORT DefaultPrefStore : public ValueMapPrefStore {
+class BASE_PREFS_EXPORT DefaultPrefStore : public PrefStore {
public:
+ typedef PrefValueMap::const_iterator const_iterator;
+
DefaultPrefStore();
battre 2012/11/07 11:50:49 nit: // Implementation of PrefStore.
+ virtual ReadResult GetValue(const std::string& key,
+ const base::Value** result) const OVERRIDE;
+
// Stores a new |value| for |key|. Assumes ownership of |value|.
void SetDefaultValue(const std::string& key, Value* value);
@@ -27,10 +33,15 @@ class BASE_PREFS_EXPORT DefaultPrefStore : public ValueMapPrefStore {
// has not been registered.
base::Value::Type GetType(const std::string& key) const;
+ const_iterator begin() const;
+ const_iterator end() const;
+
protected:
virtual ~DefaultPrefStore();
private:
+ PrefValueMap prefs_;
+
DISALLOW_COPY_AND_ASSIGN(DefaultPrefStore);
};
« no previous file with comments | « no previous file | base/prefs/default_pref_store.cc » ('j') | base/prefs/default_pref_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698