| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PREFS_PREF_REGISTRY_SIMPLE_H_ | 5 #ifndef BASE_PREFS_PREF_REGISTRY_SIMPLE_H_ |
| 6 #define COMPONENTS_PREFS_PREF_REGISTRY_SIMPLE_H_ | 6 #define BASE_PREFS_PREF_REGISTRY_SIMPLE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/prefs/base_prefs_export.h" | 13 #include "components/prefs/base_prefs_export.h" |
| 14 #include "components/prefs/pref_registry.h" | 14 #include "components/prefs/pref_registry.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class FilePath; | 18 class FilePath; |
| 19 class ListValue; | 19 class ListValue; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // A simple implementation of PrefRegistry. | 22 // A simple implementation of PrefRegistry. |
| 23 class COMPONENTS_PREFS_EXPORT PrefRegistrySimple : public PrefRegistry { | 23 class BASE_PREFS_EXPORT PrefRegistrySimple : public PrefRegistry { |
| 24 public: | 24 public: |
| 25 PrefRegistrySimple(); | 25 PrefRegistrySimple(); |
| 26 | 26 |
| 27 void RegisterBooleanPref(const std::string& path, bool default_value); | 27 void RegisterBooleanPref(const std::string& path, bool default_value); |
| 28 void RegisterIntegerPref(const std::string& path, int default_value); | 28 void RegisterIntegerPref(const std::string& path, int default_value); |
| 29 void RegisterDoublePref(const std::string& path, double default_value); | 29 void RegisterDoublePref(const std::string& path, double default_value); |
| 30 void RegisterStringPref(const std::string& path, | 30 void RegisterStringPref(const std::string& path, |
| 31 const std::string& default_value); | 31 const std::string& default_value); |
| 32 void RegisterFilePathPref(const std::string& path, | 32 void RegisterFilePathPref(const std::string& path, |
| 33 const base::FilePath& default_value); | 33 const base::FilePath& default_value); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 uint32_t flags); | 81 uint32_t flags); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 void RegisterPrefAndNotify(const std::string&, | 84 void RegisterPrefAndNotify(const std::string&, |
| 85 base::Value* default_value, | 85 base::Value* default_value, |
| 86 uint32_t flags); | 86 uint32_t flags); |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(PrefRegistrySimple); | 88 DISALLOW_COPY_AND_ASSIGN(PrefRegistrySimple); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // COMPONENTS_PREFS_PREF_REGISTRY_SIMPLE_H_ | 91 #endif // BASE_PREFS_PREF_REGISTRY_SIMPLE_H_ |
| OLD | NEW |