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

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

Issue 126093007: Introduce a hash_of_hashes dictionary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +missing histogram Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PREF_HASH_STORE_IMPL_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_
6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 // Registers required local state preferences. 39 // Registers required local state preferences.
40 static void RegisterPrefs(PrefRegistrySimple* registry); 40 static void RegisterPrefs(PrefRegistrySimple* registry);
41 41
42 // PrefHashStore implementation. 42 // PrefHashStore implementation.
43 virtual ValueState CheckValue(const std::string& path, 43 virtual ValueState CheckValue(const std::string& path,
44 const base::Value* value) const OVERRIDE; 44 const base::Value* value) const OVERRIDE;
45 virtual void StoreHash(const std::string& path, 45 virtual void StoreHash(const std::string& path,
46 const base::Value* value) OVERRIDE; 46 const base::Value* value) OVERRIDE;
47 47
48 private: 48 private:
49 // Returns true if the dictionary of hashes stored for |hash_store_id_| is
50 // trusted (which implies unknown values can be trusted as newly tracked
51 // values).
52 bool IsHashDictionaryTrusted() const;
53
49 std::string hash_store_id_; 54 std::string hash_store_id_;
50 PrefHashCalculator pref_hash_calculator_; 55 PrefHashCalculator pref_hash_calculator_;
51 PrefService* local_state_; 56 PrefService* local_state_;
57 bool initial_hashes_dictionary_trusted_;
52 58
53 DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); 59 DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl);
54 }; 60 };
55 61
56 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ 62 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698