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

Unified Diff: base/prefs/json_pref_store.h

Issue 90563003: Fix a race condition in preference metric reporting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also filter 'empty loads' as in new run or corrupted pref file scenarios. Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gyp ('k') | base/prefs/json_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/json_pref_store.h
diff --git a/base/prefs/json_pref_store.h b/base/prefs/json_pref_store.h
index 21fc8f95ac9c0a1863cc665c1ece4133fb14c1d3..ad13feba3f6e1279c7c2bee4d597df35d1698842 100644
--- a/base/prefs/json_pref_store.h
+++ b/base/prefs/json_pref_store.h
@@ -18,6 +18,8 @@
#include "base/prefs/base_prefs_export.h"
#include "base/prefs/persistent_pref_store.h"
+class PrefFilter;
+
namespace base {
class DictionaryValue;
class FilePath;
@@ -41,7 +43,8 @@ class BASE_PREFS_EXPORT JsonPrefStore
// |sequenced_task_runner| is must be a shutdown-blocking task runner, ideally
// created by GetTaskRunnerForFile() method above.
JsonPrefStore(const base::FilePath& pref_filename,
- base::SequencedTaskRunner* sequenced_task_runner);
+ base::SequencedTaskRunner* sequenced_task_runner,
+ scoped_ptr<PrefFilter> pref_filter);
// PrefStore overrides:
virtual bool GetValue(const std::string& key,
@@ -87,6 +90,7 @@ class BASE_PREFS_EXPORT JsonPrefStore
// Helper for safely writing pref data.
base::ImportantFileWriter writer_;
+ scoped_ptr<PrefFilter> pref_filter_;
ObserverList<PrefStore::Observer, true> observers_;
scoped_ptr<ReadErrorDelegate> error_delegate_;
« no previous file with comments | « base/base.gyp ('k') | base/prefs/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698