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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_
6 #define COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_
7
8 #include "base/time/time.h"
9 #include "url/gurl.h"
10
11 namespace reporting {
12
13 // Section 2.2
14 struct ReportingClient {
15 public:
16 ReportingClient(const GURL& origin,
17 bool subdomains,
18 const std::string& group,
19 base::TimeDelta ttl,
20 base::TimeTicks creation);
21
22 GURL origin;
23 bool subdomains;
24 std::string group;
25 base::TimeDelta ttl;
26 base::TimeTicks creation;
27
28 bool is_expired(base::TimeTicks now) const { return creation + ttl < now; }
29 };
30
31 } // namespace reporting
32
33 #endif // COMPONENTS_CORE_BROWSER_REPORTING_REPORTING_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698