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

Unified Diff: components/reporting/core/browser/reporting_client.h

Issue 2249213002: [OBSOLETE] Reporting: Initial implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ProfileImplIOData Created 4 years, 2 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: 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_

Powered by Google App Engine
This is Rietveld 408576698