Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom

Issue 2719833002: Convert TrackedPreferenceValidationDelegate into a mojo interface. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/preferences/public/interfaces/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..370f95f75d9801e6a91fc5d498d7d90b6ceb6d2b
--- /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
+ // 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);
+};
« no previous file with comments | « services/preferences/public/interfaces/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698