| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_COMMON_PREF_STORE_H_ | 5 #ifndef CHROME_COMMON_PREF_STORE_H_ |
| 6 #define CHROME_COMMON_PREF_STORE_H_ | 6 #define CHROME_COMMON_PREF_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 PrefStore() {} | 45 PrefStore() {} |
| 46 virtual ~PrefStore() {} | 46 virtual ~PrefStore() {} |
| 47 | 47 |
| 48 // Add and remove observers. | 48 // Add and remove observers. |
| 49 virtual void AddObserver(Observer* observer) {} | 49 virtual void AddObserver(Observer* observer) {} |
| 50 virtual void RemoveObserver(Observer* observer) {} | 50 virtual void RemoveObserver(Observer* observer) {} |
| 51 | 51 |
| 52 // Whether the store has completed all asynchronous initialization. | 52 // Whether the store has completed all asynchronous initialization. |
| 53 virtual bool IsInitializationComplete() const { return true; } | 53 virtual bool IsInitializationComplete() const; |
| 54 | 54 |
| 55 // Get the value for a given preference |key| and stores it in |result|. | 55 // Get the value for a given preference |key| and stores it in |result|. |
| 56 // |result| is only modified if the return value is READ_OK. Ownership of the | 56 // |result| is only modified if the return value is READ_OK. Ownership of the |
| 57 // |result| value remains with the PrefStore. | 57 // |result| value remains with the PrefStore. |
| 58 virtual ReadResult GetValue(const std::string& key, Value** result) const = 0; | 58 virtual ReadResult GetValue(const std::string& key, Value** result) const = 0; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(PrefStore); | 60 DISALLOW_COPY_AND_ASSIGN(PrefStore); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 #endif // CHROME_COMMON_PREF_STORE_H_ | 63 #endif // CHROME_COMMON_PREF_STORE_H_ |
| OLD | NEW |