Chromium Code Reviews| Index: components/prefs/pref_value_store.h |
| diff --git a/components/prefs/pref_value_store.h b/components/prefs/pref_value_store.h |
| index 39b6bf1870ee3fc06e1eb9f53a243284c6109334..7fb118445766875c7a4f86ec0faf587932ac8513 100644 |
| --- a/components/prefs/pref_value_store.h |
| +++ b/components/prefs/pref_value_store.h |
| @@ -117,7 +117,6 @@ class COMPONENTS_PREFS_EXPORT PrefValueStore { |
| // Update the command line PrefStore with |command_line_prefs|. |
| void UpdateCommandLinePrefStore(PrefStore* command_line_prefs); |
| - private: |
| // PrefStores must be listed here in order from highest to lowest priority. |
| // MANAGED contains all managed preference values that are provided by |
| // mandatory policies (e.g. Windows Group Policy or cloud policy). |
| @@ -142,6 +141,7 @@ class COMPONENTS_PREFS_EXPORT PrefValueStore { |
| PREF_STORE_TYPE_MAX = DEFAULT_STORE |
| }; |
| + private: |
| // Keeps a PrefStore reference on behalf of the PrefValueStore and monitors |
| // the PrefStore for changes, forwarding notifications to PrefValueStore. This |
| // indirection is here for the sake of disambiguating notifications from the |
| @@ -257,4 +257,15 @@ class COMPONENTS_PREFS_EXPORT PrefValueStore { |
| DISALLOW_COPY_AND_ASSIGN(PrefValueStore); |
| }; |
| +namespace std { |
| + |
| +template <> |
| +struct hash<PrefValueStore::PrefStoreType> { |
| + size_t operator()(const PrefValueStore::PrefStoreType& type) const { |
| + return static_cast<std::size_t>(type); |
|
Sam McNally
2017/02/24 04:14:53
size_t for an enum with a -1?
tibell
2017/02/27 00:02:53
Done.
|
| + } |
| +}; |
| + |
| +} // namespace std |
| + |
| #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ |