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

Side by Side Diff: net/reporting/reporting_report.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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 NET_REPORTING_REPORTING_REPORT_H_
6 #define NET_REPORTING_REPORTING_REPORT_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/time/time.h"
12 #include "net/base/net_export.h"
13 #include "url/gurl.h"
14
15 namespace base {
16 class Value;
17 } // namespace base
18
19 namespace net {
20
21 // An undelivered report.
22 struct NET_EXPORT ReportingReport {
23 public:
24 ReportingReport(const GURL& url,
25 const std::string& group,
26 const std::string& type,
27 std::unique_ptr<const base::Value> body,
28 base::TimeTicks queued,
29 int attempts);
30 ~ReportingReport();
31
32 // The URL of the document that triggered the report.
33 GURL url;
34
35 // The endpoint group that should be used to deliver the report.
36 std::string group;
37
38 // The type of the report.
39 std::string type;
40
41 // The body of the report.
42 std::unique_ptr<const base::Value> body;
43
44 // When the report was queued.
45 base::TimeTicks queued;
46
47 // The number of delivery attempts made so far, not including an active
48 // attempt.
49 int attempts = 0;
50
51 private:
52 DISALLOW_COPY_AND_ASSIGN(ReportingReport);
53 };
54
55 } // namespace net
56
57 #endif // NET_REPORTING_REPORTING_REPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698