| 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 // A helper class that stays in sync with a preference (bool, int, real, | 5 // A helper class that stays in sync with a preference (bool, int, real, |
| 6 // string or filepath). For example: | 6 // string or filepath). For example: |
| 7 // | 7 // |
| 8 // class MyClass { | 8 // class MyClass { |
| 9 // public: | 9 // public: |
| 10 // MyClass(PrefService* prefs) { | 10 // MyClass(PrefService* prefs) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include <string> | 27 #include <string> |
| 28 #include <vector> | 28 #include <vector> |
| 29 | 29 |
| 30 #include "base/basictypes.h" | 30 #include "base/basictypes.h" |
| 31 #include "base/bind.h" | 31 #include "base/bind.h" |
| 32 #include "base/callback_forward.h" | 32 #include "base/callback_forward.h" |
| 33 #include "base/files/file_path.h" | 33 #include "base/files/file_path.h" |
| 34 #include "base/logging.h" | 34 #include "base/logging.h" |
| 35 #include "base/memory/ref_counted.h" | 35 #include "base/memory/ref_counted.h" |
| 36 #include "base/message_loop_proxy.h" | 36 #include "base/message_loop/message_loop_proxy.h" |
| 37 #include "base/prefs/base_prefs_export.h" | 37 #include "base/prefs/base_prefs_export.h" |
| 38 #include "base/prefs/pref_observer.h" | 38 #include "base/prefs/pref_observer.h" |
| 39 #include "base/values.h" | 39 #include "base/values.h" |
| 40 | 40 |
| 41 class PrefService; | 41 class PrefService; |
| 42 | 42 |
| 43 namespace subtle { | 43 namespace subtle { |
| 44 | 44 |
| 45 class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver { | 45 class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver { |
| 46 public: | 46 public: |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 typedef PrefMember<bool> BooleanPrefMember; | 344 typedef PrefMember<bool> BooleanPrefMember; |
| 345 typedef PrefMember<int> IntegerPrefMember; | 345 typedef PrefMember<int> IntegerPrefMember; |
| 346 typedef PrefMember<double> DoublePrefMember; | 346 typedef PrefMember<double> DoublePrefMember; |
| 347 typedef PrefMember<std::string> StringPrefMember; | 347 typedef PrefMember<std::string> StringPrefMember; |
| 348 typedef PrefMember<base::FilePath> FilePathPrefMember; | 348 typedef PrefMember<base::FilePath> FilePathPrefMember; |
| 349 // This preference member is expensive for large string arrays. | 349 // This preference member is expensive for large string arrays. |
| 350 typedef PrefMember<std::vector<std::string> > StringListPrefMember; | 350 typedef PrefMember<std::vector<std::string> > StringListPrefMember; |
| 351 | 351 |
| 352 #endif // BASE_PREFS_PREF_MEMBER_H_ | 352 #endif // BASE_PREFS_PREF_MEMBER_H_ |
| OLD | NEW |