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

Unified Diff: content/common/net/reporting.mojom

Issue 2881593002: Reporting: Plumb into RenderFrame via Mojo (Closed)
Patch Set: Enumify. Created 3 years, 7 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
Index: content/common/net/reporting.mojom
diff --git a/content/common/net/reporting.mojom b/content/common/net/reporting.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..d17a3997ab3c653a23d8c981a0df1ad76a9e7838
--- /dev/null
+++ b/content/common/net/reporting.mojom
@@ -0,0 +1,38 @@
+// 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 content.mojom;
+
+import "mojo/common/values.mojom";
+import "url/mojo/url.mojom";
+
+// Instead of accepting an arbitrary string type, this interface limits the
+// renderer to a fixed set of expected report types. If you're implementing
+// Reporting support for a new feature in the renderer, feel free to add your
+// feature here and in //content/browser/net/reporting_service_proxy.cc.
+enum ReportingReportType {
+ CSP,
+ INTERVENTION,
+ DEPRECATION
+};
+
+// Proxies Reporting API (https://wicg.github.io/reporting/) reports from the
+// renderer into the network stack (where Reporting lives).
+interface ReportingServiceProxy {
+ // Attempts to queue a report using the Reporting API.
+ //
+ // |url| is the URL that generated the report.
+ //
+ // |group| is the endpoint group that should receive the report. This should
+ // be configured for the feature using Reporting by the site that generated
+ // the report.
+ //
+ // |type| is the type of report, from the above enum.
+ //
+ // |body| is the body. It can be any valid Value.
+ QueueReport(url.mojom.Url url,
+ string group,
+ ReportingReportType type,
+ mojo.common.mojom.Value body);
+};

Powered by Google App Engine
This is Rietveld 408576698