| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "chrome/common/important_file_writer.h" | 15 #include "chrome/common/important_file_writer.h" |
| 16 #include "chrome/common/persistent_pref_store.h" | 16 #include "chrome/common/persistent_pref_store.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; |
| 19 class MessageLoopProxy; | 20 class MessageLoopProxy; |
| 21 class Value; |
| 20 } | 22 } |
| 21 | 23 |
| 22 class DictionaryValue; | |
| 23 class FilePath; | 24 class FilePath; |
| 24 class Value; | 25 |
| 26 using base::DictionaryValue; |
| 27 using base::Value; |
| 25 | 28 |
| 26 // A writable PrefStore implementation that is used for user preferences. | 29 // A writable PrefStore implementation that is used for user preferences. |
| 27 class JsonPrefStore : public PersistentPrefStore, | 30 class JsonPrefStore : public PersistentPrefStore, |
| 28 public ImportantFileWriter::DataSerializer { | 31 public ImportantFileWriter::DataSerializer { |
| 29 public: | 32 public: |
| 30 // |file_message_loop_proxy| is the MessageLoopProxy for a thread on which | 33 // |file_message_loop_proxy| is the MessageLoopProxy for a thread on which |
| 31 // file I/O can be done. | 34 // file I/O can be done. |
| 32 JsonPrefStore(const FilePath& pref_filename, | 35 JsonPrefStore(const FilePath& pref_filename, |
| 33 base::MessageLoopProxy* file_message_loop_proxy); | 36 base::MessageLoopProxy* file_message_loop_proxy); |
| 34 virtual ~JsonPrefStore(); | 37 virtual ~JsonPrefStore(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ObserverList<PrefStore::Observer, true> observers_; | 79 ObserverList<PrefStore::Observer, true> observers_; |
| 77 | 80 |
| 78 scoped_ptr<ReadErrorDelegate> error_delegate_; | 81 scoped_ptr<ReadErrorDelegate> error_delegate_; |
| 79 | 82 |
| 80 bool initialized_; | 83 bool initialized_; |
| 81 | 84 |
| 82 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); | 85 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 #endif // CHROME_COMMON_JSON_PREF_STORE_H_ | 88 #endif // CHROME_COMMON_JSON_PREF_STORE_H_ |
| OLD | NEW |