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

Side by Side Diff: base/prefs/json_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 | « android_webview/browser/aw_pref_store.h ('k') | base/prefs/json_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 (c) 2012 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 BASE_PREFS_JSON_PREF_STORE_H_ 5 #ifndef BASE_PREFS_JSON_PREF_STORE_H_
6 #define BASE_PREFS_JSON_PREF_STORE_H_ 6 #define BASE_PREFS_JSON_PREF_STORE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 uint32 flags) override; 91 uint32 flags) override;
92 void RemoveValue(const std::string& key, uint32 flags) override; 92 void RemoveValue(const std::string& key, uint32 flags) override;
93 bool ReadOnly() const override; 93 bool ReadOnly() const override;
94 PrefReadError GetReadError() const override; 94 PrefReadError GetReadError() const override;
95 // Note this method may be asynchronous if this instance has a |pref_filter_| 95 // Note this method may be asynchronous if this instance has a |pref_filter_|
96 // in which case it will return PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE. 96 // in which case it will return PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE.
97 // See details in pref_filter.h. 97 // See details in pref_filter.h.
98 PrefReadError ReadPrefs() override; 98 PrefReadError ReadPrefs() override;
99 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; 99 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
100 void CommitPendingWrite() override; 100 void CommitPendingWrite() override;
101 void SchedulePendingLossyWrites() override;
101 void ReportValueChanged(const std::string& key, uint32 flags) override; 102 void ReportValueChanged(const std::string& key, uint32 flags) override;
102 103
103 // Just like RemoveValue(), but doesn't notify observers. Used when doing some 104 // Just like RemoveValue(), but doesn't notify observers. Used when doing some
104 // cleanup that shouldn't otherwise alert observers. 105 // cleanup that shouldn't otherwise alert observers.
105 void RemoveValueSilently(const std::string& key, uint32 flags); 106 void RemoveValueSilently(const std::string& key, uint32 flags);
106 107
107 // Registers |on_next_successful_write| to be called once, on the next 108 // Registers |on_next_successful_write| to be called once, on the next
108 // successful write event of |writer_|. 109 // successful write event of |writer_|.
109 void RegisterOnNextSuccessfulWriteCallback( 110 void RegisterOnNextSuccessfulWriteCallback(
110 const base::Closure& on_next_successful_write); 111 const base::Closure& on_next_successful_write);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 PrefReadError read_error_; 219 PrefReadError read_error_;
219 220
220 std::set<std::string> keys_need_empty_value_; 221 std::set<std::string> keys_need_empty_value_;
221 222
222 WriteCountHistogram write_count_histogram_; 223 WriteCountHistogram write_count_histogram_;
223 224
224 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); 225 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
225 }; 226 };
226 227
227 #endif // BASE_PREFS_JSON_PREF_STORE_H_ 228 #endif // BASE_PREFS_JSON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_pref_store.h ('k') | base/prefs/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698