Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 NET_REPORTING_REPORTING_REPORT_H_ | |
| 6 #define NET_REPORTING_REPORTING_REPORT_H_ | |
| 7 | |
| 8 #include "base/time/time.h" | |
| 9 #include "base/values.h" | |
| 10 #include "url/gurl.h" | |
| 11 | |
| 12 namespace net { | |
| 13 | |
| 14 // A report queued by another component to be delivered by Reporting. | |
| 15 struct ReportingReport { | |
|
Ryan Sleevi
2017/01/03 21:28:13
From a design standpoint, this feels more like a c
Julia Tuttle
2017/01/25 20:27:46
My gut feeling is that it's a struct, but I'm maki
| |
| 16 public: | |
| 17 ReportingReport(); | |
| 18 ~ReportingReport(); | |
|
Ryan Sleevi
2017/01/03 21:28:13
Rule of three applies here - in general, if you pr
Julia Tuttle
2017/01/25 20:27:46
Done.
| |
| 19 | |
| 20 std::string ToString() const; | |
|
Ryan Sleevi
2017/01/03 21:28:13
From reading the header: Why does this exist? What
Julia Tuttle
2017/01/25 20:27:46
It was for testing, but I'm gonna remove it for no
| |
| 21 | |
| 22 std::unique_ptr<base::Value> body; | |
|
Ryan Sleevi
2017/01/03 21:28:13
What is this? Why is it a base::Value versus anoth
Julia Tuttle
2017/01/25 20:27:45
It's the report body, which is any JSON.
| |
| 23 // URL of content that triggered report. | |
|
Ryan Sleevi
2017/01/03 21:28:13
nelines between 22-23
Julia Tuttle
2017/01/25 20:27:46
Done.
| |
| 24 GURL url; | |
| 25 // Origin of content that triggered report. Should be url.GetOrigin(), but the | |
| 26 // spec doesn't guarantee this, and allows callers to provide URL and origin | |
| 27 // separately, so they are separate fields for now. | |
|
Ryan Sleevi
2017/01/03 21:28:13
Line break between 24-25 and 29-30
As comments go
Julia Tuttle
2017/01/25 20:27:46
There is a bug filed, at https://github.com/WICG/r
| |
| 28 GURL origin; | |
| 29 std::string group; | |
| 30 std::string type; | |
| 31 | |
| 32 // Creation timestamp. | |
| 33 base::TimeTicks timestamp; | |
|
Ryan Sleevi
2017/01/03 21:28:13
naming: "timestamp" is self-describing without add
Julia Tuttle
2017/01/25 20:27:45
Renamed to "queued".
| |
| 34 // Number of delivery attempts made. | |
| 35 int attempts; | |
|
Ryan Sleevi
2017/01/03 21:28:13
size_t for counts - https://chromium.googlesource.
Julia Tuttle
2017/01/25 20:27:45
Done.
| |
| 36 // Whether this report is currently part of a pending delivery attempt. | |
| 37 bool pending; | |
|
Ryan Sleevi
2017/01/03 21:28:13
This feels like an interface bleed - why should th
Julia Tuttle
2017/01/25 20:27:46
Obsolete; I'm making Report an inner, private clas
| |
| 38 }; | |
| 39 | |
| 40 } // namespace net | |
| 41 | |
| 42 #endif // NET_REPORTING_REPORTING_REPORT_H_ | |
| OLD | NEW |