// 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 // 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 invalid_keys, array external_validation_invalid_keys, ValueState value_state, ValueState external_validation_value_state, bool is_personal); };