| OLD | NEW |
| 1 // Copyright (c) 2011 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 CHROME_COMMON_JSON_PREF_STORE_H_ | 5 #ifndef CHROME_COMMON_JSON_PREF_STORE_H_ |
| 6 #define CHROME_COMMON_JSON_PREF_STORE_H_ | 6 #define CHROME_COMMON_JSON_PREF_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 32 // file I/O can be done. | 32 // file I/O can be done. |
| 33 JsonPrefStore(const FilePath& pref_filename, | 33 JsonPrefStore(const FilePath& pref_filename, |
| 34 base::MessageLoopProxy* file_message_loop_proxy); | 34 base::MessageLoopProxy* file_message_loop_proxy); |
| 35 virtual ~JsonPrefStore(); | 35 virtual ~JsonPrefStore(); |
| 36 | 36 |
| 37 // PrefStore overrides: | 37 // PrefStore overrides: |
| 38 virtual ReadResult GetValue(const std::string& key, | 38 virtual ReadResult GetValue(const std::string& key, |
| 39 const base::Value** result) const OVERRIDE; | 39 const base::Value** result) const OVERRIDE; |
| 40 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; | 40 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; |
| 41 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; | 41 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; |
| 42 virtual size_t NumberOfObservers() const OVERRIDE; |
| 42 virtual bool IsInitializationComplete() const OVERRIDE; | 43 virtual bool IsInitializationComplete() const OVERRIDE; |
| 43 | 44 |
| 44 // PersistentPrefStore overrides: | 45 // PersistentPrefStore overrides: |
| 45 virtual ReadResult GetMutableValue(const std::string& key, | 46 virtual ReadResult GetMutableValue(const std::string& key, |
| 46 base::Value** result) OVERRIDE; | 47 base::Value** result) OVERRIDE; |
| 47 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; | 48 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; |
| 48 virtual void SetValueSilently(const std::string& key, | 49 virtual void SetValueSilently(const std::string& key, |
| 49 base::Value* value) OVERRIDE; | 50 base::Value* value) OVERRIDE; |
| 50 virtual void RemoveValue(const std::string& key) OVERRIDE; | 51 virtual void RemoveValue(const std::string& key) OVERRIDE; |
| 51 virtual bool ReadOnly() const OVERRIDE; | 52 virtual bool ReadOnly() const OVERRIDE; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 77 ObserverList<PrefStore::Observer, true> observers_; | 78 ObserverList<PrefStore::Observer, true> observers_; |
| 78 | 79 |
| 79 scoped_ptr<ReadErrorDelegate> error_delegate_; | 80 scoped_ptr<ReadErrorDelegate> error_delegate_; |
| 80 | 81 |
| 81 bool initialized_; | 82 bool initialized_; |
| 82 | 83 |
| 83 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); | 84 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 #endif // CHROME_COMMON_JSON_PREF_STORE_H_ | 87 #endif // CHROME_COMMON_JSON_PREF_STORE_H_ |
| OLD | NEW |