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

Side by Side Diff: components/prefs/json_pref_store.h

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Created 3 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
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 COMPONENTS_PREFS_JSON_PREF_STORE_H_ 5 #ifndef COMPONENTS_PREFS_JSON_PREF_STORE_H_
6 #define COMPONENTS_PREFS_JSON_PREF_STORE_H_ 6 #define COMPONENTS_PREFS_JSON_PREF_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Registers |on_next_successful_write_reply| to be called once, on the next 113 // Registers |on_next_successful_write_reply| to be called once, on the next
114 // successful write event of |writer_|. 114 // successful write event of |writer_|.
115 // |on_next_successful_write_reply| will be called on the thread from which 115 // |on_next_successful_write_reply| will be called on the thread from which
116 // this method is called and does not need to be thread safe. 116 // this method is called and does not need to be thread safe.
117 void RegisterOnNextSuccessfulWriteReply( 117 void RegisterOnNextSuccessfulWriteReply(
118 const base::Closure& on_next_successful_write_reply); 118 const base::Closure& on_next_successful_write_reply);
119 119
120 void ClearMutableValues() override; 120 void ClearMutableValues() override;
121 121
122 void CleanupForProfileDeletion() override;
123
122 private: 124 private:
123 // Represents a histogram for recording the number of writes to the pref file 125 // Represents a histogram for recording the number of writes to the pref file
124 // that occur every kHistogramWriteReportIntervalInMins minutes. 126 // that occur every kHistogramWriteReportIntervalInMins minutes.
125 class COMPONENTS_PREFS_EXPORT WriteCountHistogram { 127 class COMPONENTS_PREFS_EXPORT WriteCountHistogram {
126 public: 128 public:
127 static const int32_t kHistogramWriteReportIntervalMins; 129 static const int32_t kHistogramWriteReportIntervalMins;
128 130
129 WriteCountHistogram(const base::TimeDelta& commit_interval, 131 WriteCountHistogram(const base::TimeDelta& commit_interval,
130 const base::FilePath& path); 132 const base::FilePath& path);
131 // Constructor for testing. |clock| is a test Clock that is used to retrieve 133 // Constructor for testing. |clock| is a test Clock that is used to retrieve
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 252
251 bool has_pending_write_reply_ = true; 253 bool has_pending_write_reply_ = true;
252 base::Closure on_next_successful_write_reply_; 254 base::Closure on_next_successful_write_reply_;
253 255
254 WriteCountHistogram write_count_histogram_; 256 WriteCountHistogram write_count_histogram_;
255 257
256 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); 258 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
257 }; 259 };
258 260
259 #endif // COMPONENTS_PREFS_JSON_PREF_STORE_H_ 261 #endif // COMPONENTS_PREFS_JSON_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698