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

Unified Diff: net/reporting/reporting_client.h

Issue 2708503002: Reporting: Implement cache. (Closed)
Patch Set: Make requested changes. 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
Index: net/reporting/reporting_client.h
diff --git a/net/reporting/reporting_client.h b/net/reporting/reporting_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..0aa11bea57d485b82abb723100b678c4086007d2
--- /dev/null
+++ b/net/reporting/reporting_client.h
@@ -0,0 +1,53 @@
+// 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.
+
+#ifndef NET_REPORTING_REPORTING_CLIENT_H_
+#define NET_REPORTING_REPORTING_CLIENT_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "net/base/net_export.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+
+namespace net {
+
+// The configuration by an origin to use an endpoint for report delivery.
+struct NET_EXPORT ReportingClient {
+ public:
+ enum class Subdomains { EXCLUDE = 0, INCLUDE = 1 };
+
+ ReportingClient(const url::Origin& origin,
+ const GURL& endpoint,
+ Subdomains subdomains,
+ const std::string& group,
+ base::TimeTicks expires);
+ ~ReportingClient();
+
+ // The origin from which reports will be delivered.
+ url::Origin origin;
+
+ // The endpoint to which reports may be delivered. (Origins may configure
+ // many.)
+ GURL endpoint;
+
+ // Whether subdomains of the host of |origin| should also be handled by this
+ // client.
+ Subdomains subdomains = Subdomains::EXCLUDE;
+
+ // The endpoint group to which this client belongs.
+ std::string group = "default";
+
+ // When this client's max-age has expired.
+ base::TimeTicks expires;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ReportingClient);
+};
+
+} // namespace net
+
+#endif // NET_REPORTING_REPORTING_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698