Chromium Code Reviews| Index: services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom |
| diff --git a/services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom b/services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ff49ce2bcc5c9ef5c8c4baa89b90de4d1dcf0aba |
| --- /dev/null |
| +++ b/services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom |
| @@ -0,0 +1,56 @@ |
| +// Copyright 2017 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. |
| + |
| +module prefs.mojom; |
| + |
| +import "mojo/common/values.mojom"; |
| + |
| +// A TrackedPreferenceValidationDelegate is notified of the results of each |
| +// tracked preference validation event. |
| +interface TrackedPreferenceValidationDelegate { |
| + enum ValueState { |
| + // The preference value corresponds to its stored hash. |
| + UNCHANGED, |
| + // The preference has been cleared since the last hash. |
| + CLEARED, |
| + // The preference value corresponds to its stored hash, but the hash was |
| + // calculated using a deprecated hash algorithm which is just as safe as |
| + // the current one. |
| + SECURE_LEGACY, |
| + // The preference value has been changed since the last hash. |
| + CHANGED, |
| + // No stored hash exists for the preference value. |
| + UNTRUSTED_UNKNOWN_VALUE, |
| + // No stored hash exists for the preference value, but the current set of |
| + // hashes stored is trusted and thus this value can safely be seeded. This |
| + // happens when all hashes are already properly seeded and a newly |
| + // tracked value needs to be seeded). |
| + TRUSTED_UNKNOWN_VALUE, |
| + // NULL values are inherently trusted. |
| + TRUSTED_NULL_VALUE, |
| + // This transaction's store type is not supported. |
| + UNSUPPORTED, |
| + }; |
| + |
| + // Notifies observes of the result (|value_state|) of checking the atomic |
| + // |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.
|
| + // or not the value may contain personal information. |
| + OnAtomicPreferenceValidation( |
| + string pref_path, |
| + mojo.common.mojom.Value? value, |
| + ValueState value_state, |
| + ValueState external_validation_value_state, |
| + bool is_personal); |
| + |
| + // Notifies observes of the result (|value_state|) of checking the split |
| + // value at |pref_path|. |is_personal| indicates whether or not the value may |
| + // contain personal information. |
| + OnSplitPreferenceValidation( |
| + string pref_path, |
| + array<string> invalid_keys, |
| + array<string> external_validation_invalid_keys, |
| + ValueState value_state, |
| + ValueState external_validation_value_state, |
| + bool is_personal); |
| +}; |