| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ |
| 6 #define CHROME_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 uint32 flags) override; | 53 uint32 flags) override; |
| 54 void SetValueSilently(const std::string& key, | 54 void SetValueSilently(const std::string& key, |
| 55 base::Value* value, | 55 base::Value* value, |
| 56 uint32 flags) override; | 56 uint32 flags) override; |
| 57 void RemoveValue(const std::string& key, uint32 flags) override; | 57 void RemoveValue(const std::string& key, uint32 flags) override; |
| 58 bool ReadOnly() const override; | 58 bool ReadOnly() const override; |
| 59 PrefReadError GetReadError() const override; | 59 PrefReadError GetReadError() const override; |
| 60 PrefReadError ReadPrefs() override; | 60 PrefReadError ReadPrefs() override; |
| 61 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; | 61 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; |
| 62 void CommitPendingWrite() override; | 62 void CommitPendingWrite() override; |
| 63 void SchedulePendingLossyWrites() override; |
| 63 void ReportValueChanged(const std::string& key, uint32 flags) override; | 64 void ReportValueChanged(const std::string& key, uint32 flags) override; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 struct ReadingResults; | 67 struct ReadingResults; |
| 67 class FileThreadSerializer; | 68 class FileThreadSerializer; |
| 68 | 69 |
| 69 ~LevelDBPrefStore() override; | 70 ~LevelDBPrefStore() override; |
| 70 | 71 |
| 71 static scoped_ptr<ReadingResults> DoReading(const base::FilePath& path); | 72 static scoped_ptr<ReadingResults> DoReading(const base::FilePath& path); |
| 72 static void OpenDB(const base::FilePath& path, | 73 static void OpenDB(const base::FilePath& path, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 base::hash_set<std::string> keys_to_delete_; | 111 base::hash_set<std::string> keys_to_delete_; |
| 111 base::hash_map<std::string, std::string> keys_to_set_; | 112 base::hash_map<std::string, std::string> keys_to_set_; |
| 112 base::OneShotTimer<LevelDBPrefStore> timer_; | 113 base::OneShotTimer<LevelDBPrefStore> timer_; |
| 113 | 114 |
| 114 base::WeakPtrFactory<LevelDBPrefStore> weak_ptr_factory_; | 115 base::WeakPtrFactory<LevelDBPrefStore> weak_ptr_factory_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(LevelDBPrefStore); | 117 DISALLOW_COPY_AND_ASSIGN(LevelDBPrefStore); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 #endif // CHROME_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ | 120 #endif // CHROME_BROWSER_PREFS_LEVELDB_PREF_STORE_H_ |
| OLD | NEW |