Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
|
erikwright (departed)
2014/01/17 20:23:01
Update this in all your new files. It's 2014, baby
gab
2014/01/17 21:32:01
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PREFS_TRACKED_PREFERENCE_H_ | |
| 6 #define CHROME_BROWSER_PREFS_TRACKED_PREFERENCE_H_ | |
| 7 | |
| 8 class PrefHashStore; | |
| 9 | |
| 10 namespace base { | |
| 11 class DictionaryValue; | |
| 12 class Value; | |
| 13 } | |
| 14 | |
| 15 // A TrackedPreference is a pure-virtual class whose subclasses are responsible | |
|
erikwright (departed)
2014/01/17 20:23:01
I think it's atypical to describe a class's OO cha
gab
2014/01/17 21:32:01
Done.
| |
| 16 // for handling hash storage and pref enforcement with the help of decisions | |
| 17 // made via queries to TrackedPreferenceHelper. | |
| 18 class TrackedPreference { | |
| 19 public: | |
| 20 virtual ~TrackedPreference() {} | |
| 21 | |
| 22 // Stores a new hash in |pref_hash_store| for this preference's |value|. | |
|
erikwright (departed)
2014/01/17 20:23:01
The method name and comment are somewhat misleadin
gab
2014/01/17 21:32:01
Done.
| |
| 23 virtual void StoreHash(const base::Value* value, | |
| 24 PrefHashStore* pref_hash_store) const = 0; | |
| 25 | |
| 26 // Enforces that the value of this tracked preference in |pref_store_contents| | |
|
erikwright (departed)
2014/01/17 20:23:01
Enforces -> Verifies...
// ... Responds to verifi
gab
2014/01/17 21:32:01
Done.
| |
| 27 // is valid according to |pref_hash_store|; otherwise discarding the value in | |
| 28 // |pref_store_contents|. Reports on its findings via UMA. | |
| 29 virtual void EnforceAndReport( | |
| 30 PrefHashStore* pref_hash_store, | |
| 31 base::DictionaryValue* pref_store_contents) const = 0; | |
| 32 }; | |
| 33 | |
| 34 #endif // CHROME_BROWSER_PREFS_TRACKED_PREFERENCE_H_ | |
| OLD | NEW |