Chromium Code Reviews| Index: chrome/browser/prefs/pref_hash_filter.h |
| diff --git a/chrome/browser/prefs/pref_hash_filter.h b/chrome/browser/prefs/pref_hash_filter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0e21f2993f07a4db514c083f87f30f073d28b313 |
| --- /dev/null |
| +++ b/chrome/browser/prefs/pref_hash_filter.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_PREFS_PREF_HASH_FILTER_H_ |
| +#define CHROME_BROWSER_PREFS_PREF_HASH_FILTER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/prefs/pref_filter.h" |
| + |
| +class PersistentPrefStore; |
| +class PrefHashStore; |
| + |
| +// Intercepts preference values as they are loaded from disk and verifies them |
| +// using a PrefHashStore. Keeps the PrefHashStore contents up to date as values |
| +// are changed. |
| +class PrefHashFilter : public PrefFilter { |
| + public: |
| + explicit PrefHashFilter(scoped_ptr<PrefHashStore> pref_hash_store); |
| + virtual ~PrefHashFilter(); |
| + |
| + // PrefFilter implementation. |
| + virtual void FilterOnLoad(PersistentPrefStore* pref_store) OVERRIDE; |
| + virtual void FilterUpdate(PersistentPrefStore* pref_store, |
| + const std::string& path) OVERRIDE; |
| + |
| + private: |
| + scoped_ptr<PrefHashStore> pref_hash_store_; |
| + DISALLOW_COPY_AND_ASSIGN(PrefHashFilter); |
|
gab
2013/12/04 22:22:30
nit: I think we always have an empty line between
erikwright (departed)
2013/12/05 23:48:00
Done.
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_PREFS_PREF_HASH_FILTER_H_ |