summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public/mojom/conversions/conversions.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/public/mojom/conversions/conversions.mojom')
-rw-r--r--chromium/third_party/blink/public/mojom/conversions/conversions.mojom35
1 files changed, 33 insertions, 2 deletions
diff --git a/chromium/third_party/blink/public/mojom/conversions/conversions.mojom b/chromium/third_party/blink/public/mojom/conversions/conversions.mojom
index 146e46f4c2f..2b2d6e744ee 100644
--- a/chromium/third_party/blink/public/mojom/conversions/conversions.mojom
+++ b/chromium/third_party/blink/public/mojom/conversions/conversions.mojom
@@ -7,6 +7,10 @@ module blink.mojom;
import "mojo/public/mojom/base/time.mojom";
import "url/mojom/origin.mojom";
+struct DedupKey {
+ int64 value;
+};
+
struct Conversion {
// Origin of the conversion registration redirect.
url.mojom.Origin reporting_origin;
@@ -18,6 +22,14 @@ struct Conversion {
// Event source trigger data specified in conversion redirect. 0 is used as a
// default if none is provided.
uint64 event_source_trigger_data = 0;
+
+ // Priority specified in conversion redirect. 0 is used as a default if none
+ // is provided.
+ int64 priority = 0;
+
+ // Key specified in conversion redirect for deduplication against existing
+ // conversions with the same source.
+ DedupKey? dedup_key;
};
// Mojo struct to represent blink::Impression native struct.
@@ -43,6 +55,24 @@ struct Impression {
int64 priority = 0;
};
+// Errors that can result from trying to register an impression.
+// TODO(crbug.com/1202170): In the future, this may be returned from the
+// RegisterImpression method below, so that errors from the ConversionHost can
+// be propagated to registerAttributionSource calls in JS.
+enum RegisterImpressionError {
+ // The permission policy doesn't allow use of the attribution reporting API.
+ kNotAllowed,
+ // The frame's context is not secure.
+ kInsecureContext,
+ // The attributionDestination parameter doesn't have a secure origin.
+ kInsecureAttributionDestination,
+ // The attributionReportTo parameter doesn't have a secure origin.
+ kInsecureAttributionReportTo,
+ // The attributionSourceEventId parameter isn't parsable as an unsigned
+ // 64-bit base-10 integer.
+ kInvalidAttributionSourceEventId,
+};
+
// Sent from renderer to browser process when a resource request matching the
// .well-known conversion registration path is intercepted.
interface ConversionHost {
@@ -52,7 +82,8 @@ interface ConversionHost {
RegisterConversion(Conversion conversion);
// Registers an impression. Triggered by the registerattributionsource
- // attribute being added to an anchor element alongside other API attributes.
- // These impressions are not associated with a browser navigation.
+ // attribute being added to an anchor element alongside other API attributes,
+ // or by the registerAttributionSource JS method. These impressions are not
+ // associated with a browser navigation.
RegisterImpression(Impression impression);
};