Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module prefs.mojom; | |
| 6 | |
| 7 import "mojo/common/values.mojom"; | |
| 8 | |
| 9 // A TrackedPreferenceValidationDelegate is notified of the results of each | |
| 10 // tracked preference validation event. | |
| 11 interface TrackedPreferenceValidationDelegate { | |
| 12 enum ValueState { | |
| 13 // The preference value corresponds to its stored hash. | |
| 14 UNCHANGED, | |
| 15 // The preference has been cleared since the last hash. | |
| 16 CLEARED, | |
| 17 // The preference value corresponds to its stored hash, but the hash was | |
| 18 // calculated using a deprecated hash algorithm which is just as safe as | |
| 19 // the current one. | |
| 20 SECURE_LEGACY, | |
| 21 // The preference value has been changed since the last hash. | |
| 22 CHANGED, | |
| 23 // No stored hash exists for the preference value. | |
| 24 UNTRUSTED_UNKNOWN_VALUE, | |
| 25 // No stored hash exists for the preference value, but the current set of | |
| 26 // hashes stored is trusted and thus this value can safely be seeded. This | |
| 27 // happens when all hashes are already properly seeded and a newly | |
| 28 // tracked value needs to be seeded). | |
| 29 TRUSTED_UNKNOWN_VALUE, | |
| 30 // NULL values are inherently trusted. | |
| 31 TRUSTED_NULL_VALUE, | |
| 32 // This transaction's store type is not supported. | |
| 33 UNSUPPORTED, | |
| 34 }; | |
| 35 | |
| 36 // Notifies observes of the result (|value_state|) of checking the atomic | |
| 37 // |value| (which may be NULL) at |pref_path|. |is_personal| indicates whether | |
|
dcheng
2017/03/07 08:14:15
Nit: NULL -> null
Sam McNally
2017/03/08 00:06:53
Done.
| |
| 38 // or not the value may contain personal information. | |
| 39 OnAtomicPreferenceValidation( | |
| 40 string pref_path, | |
| 41 mojo.common.mojom.Value? value, | |
| 42 ValueState value_state, | |
| 43 ValueState external_validation_value_state, | |
| 44 bool is_personal); | |
| 45 | |
| 46 // Notifies observes of the result (|value_state|) of checking the split | |
| 47 // value at |pref_path|. |is_personal| indicates whether or not the value may | |
| 48 // contain personal information. | |
| 49 OnSplitPreferenceValidation( | |
| 50 string pref_path, | |
| 51 array<string> invalid_keys, | |
| 52 array<string> external_validation_invalid_keys, | |
| 53 ValueState value_state, | |
| 54 ValueState external_validation_value_state, | |
| 55 bool is_personal); | |
| 56 }; | |
| OLD | NEW |