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

Side by Side Diff: components/reporting/core/browser/reporting_endpoint.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_REPORTING_CORE_BROWSER_REPORTING_ENDPOINT_H_
6 #define COMPONENTS_REPORTING_CORE_BROWSER_REPORTING_ENDPOINT_H_
7
8 #include <map>
9
10 #include "base/time/time.h"
11 #include "components/reporting/core/browser/reporting_client.h"
12 #include "components/reporting/core/common/reporting_export.h"
13 #include "net/base/backoff_entry.h"
14 #include "url/gurl.h"
15
16 namespace reporting {
17
18 // Section 2.1
19 struct REPORTING_EXPORT ReportingEndpoint {
20 public:
21 using ClientMap = std::map<GURL, ReportingClient>;
22 ReportingEndpoint(const GURL& url,
23 const net::BackoffEntry::Policy& backoff_policy,
24 base::TimeTicks now);
25 ~ReportingEndpoint();
26
27 const GURL url;
28
29 net::BackoffEntry backoff;
30 base::TimeTicks last_used;
31
32 // Map from client.origin to client.
33 ClientMap clients;
34
35 bool is_expired(base::TimeTicks now) const;
36 };
37
38 } // namespace reporting
39
40 #endif // COMPONENTS_REPORTING_CORE_BROWSER_REPORTING_ENDPOINT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698