| OLD | NEW | 
|---|
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50                                 const base::Value* value) const OVERRIDE; | 50                                 const base::Value* value) const OVERRIDE; | 
| 51   virtual void StoreHash(const std::string& path, | 51   virtual void StoreHash(const std::string& path, | 
| 52                          const base::Value* value) OVERRIDE; | 52                          const base::Value* value) OVERRIDE; | 
| 53   virtual ValueState CheckSplitValue( | 53   virtual ValueState CheckSplitValue( | 
| 54       const std::string& path, | 54       const std::string& path, | 
| 55       const base::DictionaryValue* initial_split_value, | 55       const base::DictionaryValue* initial_split_value, | 
| 56       std::vector<std::string>* invalid_keys) const OVERRIDE; | 56       std::vector<std::string>* invalid_keys) const OVERRIDE; | 
| 57   virtual void StoreSplitHash( | 57   virtual void StoreSplitHash( | 
| 58       const std::string& path, | 58       const std::string& path, | 
| 59       const base::DictionaryValue* split_value) OVERRIDE; | 59       const base::DictionaryValue* split_value) OVERRIDE; | 
|  | 60   virtual void RecordResetEvent() OVERRIDE; | 
| 60 | 61 | 
| 61  private: | 62  private: | 
| 62   // Clears any hashes stored for |path| through |update|. | 63   // Clears any hashes stored for |path| through |update|. | 
| 63   void ClearPath(const std::string& path, | 64   void ClearPath(const std::string& path, | 
| 64                  DictionaryPrefUpdate* update); | 65                  DictionaryPrefUpdate* update); | 
| 65 | 66 | 
| 66   // Returns true if there are split hashes stored for |path|. | 67   // Returns true if there are split hashes stored for |path|. | 
| 67   bool HasSplitHashesAtPath(const std::string& path) const; | 68   bool HasSplitHashesAtPath(const std::string& path) const; | 
| 68 | 69 | 
| 69   // Used by StoreHash and StoreSplitHash to store the hash of |new_value| at | 70   // Used by StoreHash and StoreSplitHash to store the hash of |new_value| at | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 86 | 87 | 
| 87   std::string hash_store_id_; | 88   std::string hash_store_id_; | 
| 88   PrefHashCalculator pref_hash_calculator_; | 89   PrefHashCalculator pref_hash_calculator_; | 
| 89   PrefService* local_state_; | 90   PrefService* local_state_; | 
| 90   bool initial_hashes_dictionary_trusted_; | 91   bool initial_hashes_dictionary_trusted_; | 
| 91 | 92 | 
| 92   DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); | 93   DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); | 
| 93 }; | 94 }; | 
| 94 | 95 | 
| 95 #endif  // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ | 96 #endif  // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ | 
| OLD | NEW | 
|---|