Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: chrome/browser/prefs/leveldb_pref_store.h

Issue 1148323005: Add the ability to schedule any pending lossy prefs to be written. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/prefs/testing_pref_store.cc ('k') | chrome/browser/prefs/leveldb_pref_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « base/prefs/testing_pref_store.cc ('k') | chrome/browser/prefs/leveldb_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698