Index: components/reporting/core/browser/reporting_client.h |
diff --git a/components/reporting/core/browser/reporting_client.h b/components/reporting/core/browser/reporting_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..47d7d042d726515445a0c63a1e31b46c161ad355 |
--- /dev/null |
+++ b/components/reporting/core/browser/reporting_client.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 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 COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_ |
+#define COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_ |
+ |
+#include "base/time/time.h" |
+#include "url/gurl.h" |
+ |
+namespace reporting { |
+ |
+// Section 2.2 |
+struct ReportingClient { |
+ public: |
+ ReportingClient(const GURL& origin, |
+ bool subdomains, |
+ const std::string& group, |
+ base::TimeDelta ttl, |
+ base::TimeTicks creation); |
+ |
+ GURL origin; |
+ bool subdomains; |
+ std::string group; |
+ base::TimeDelta ttl; |
+ base::TimeTicks creation; |
+ |
+ bool is_expired(base::TimeTicks now) const { return creation + ttl < now; } |
+}; |
+ |
+} // namespace reporting |
+ |
+#endif // COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_ |