OLD | NEW |
---|---|
(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(); | |
jkarlin
2017/03/17 15:07:03
Any reason to allow this constructor?
Julia Tuttle
2017/03/21 18:41:03
Done.
| |
25 ReportingReport(const GURL& url, | |
26 const std::string& group, | |
27 const std::string& type, | |
28 std::unique_ptr<const base::Value> body, | |
29 base::TimeTicks queued, | |
30 int attempts); | |
31 ~ReportingReport(); | |
32 | |
33 // The URL of the document that triggered the report. | |
34 GURL url; | |
35 | |
36 // The endpoint group that should be used to deliver the report. | |
37 std::string group; | |
38 | |
39 // The type of the report. | |
40 std::string type; | |
41 | |
42 // The body of the report. | |
43 std::unique_ptr<const base::Value> body; | |
44 | |
45 // When the report was queued. | |
46 base::TimeTicks queued; | |
47 | |
48 // The number of delivery attempts made so far, not including an active | |
49 // attempt. | |
50 int attempts = 0; | |
51 | |
52 private: | |
53 DISALLOW_COPY_AND_ASSIGN(ReportingReport); | |
54 }; | |
55 | |
56 } // namespace net | |
57 | |
58 #endif // NET_REPORTING_REPORTING_REPORT_H_ | |
OLD | NEW |