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

Side by Side Diff: components/domain_reliability/beacon.h

Issue 605473002: Domain Reliablity: Add "domain" field to reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | components/domain_reliability/beacon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 DomainReliabilityBeacon(); 22 DomainReliabilityBeacon();
23 ~DomainReliabilityBeacon(); 23 ~DomainReliabilityBeacon();
24 24
25 // Converts the Beacon to JSON format for uploading. Calculates the age 25 // Converts the Beacon to JSON format for uploading. Calculates the age
26 // relative to an upload time of |upload_time|. 26 // relative to an upload time of |upload_time|.
27 base::Value* ToValue(base::TimeTicks upload_time) const; 27 base::Value* ToValue(base::TimeTicks upload_time) const;
28 28
29 // The URL that the beacon is reporting on, if included. 29 // The URL that the beacon is reporting on, if included.
30 std::string url; 30 std::string url;
31 // The domain that the beacon is reporting on, if included.
32 std::string domain;
31 // The resource name that the beacon is reporting on, if included. 33 // The resource name that the beacon is reporting on, if included.
32 std::string resource; 34 std::string resource;
33 // Status string (e.g. "ok", "dns.nxdomain", "http.403"). 35 // Status string (e.g. "ok", "dns.nxdomain", "http.403").
34 std::string status; 36 std::string status;
35 // Net error code. Encoded as a string in the final JSON. 37 // Net error code. Encoded as a string in the final JSON.
36 int chrome_error; 38 int chrome_error;
37 // IP address of the server the request went to. 39 // IP address of the server the request went to.
38 std::string server_ip; 40 std::string server_ip;
39 // Protocol used to make the request. 41 // Protocol used to make the request.
40 std::string protocol; 42 std::string protocol;
41 // HTTP response code returned by the server, or -1 if none was received. 43 // HTTP response code returned by the server, or -1 if none was received.
42 int http_response_code; 44 int http_response_code;
43 // Elapsed time between starting and completing the request. 45 // Elapsed time between starting and completing the request.
44 base::TimeDelta elapsed; 46 base::TimeDelta elapsed;
45 // Start time of the request. Encoded as the request age in the final JSON. 47 // Start time of the request. Encoded as the request age in the final JSON.
46 base::TimeTicks start_time; 48 base::TimeTicks start_time;
47 49
48 // Okay to copy and assign. 50 // Okay to copy and assign.
49 }; 51 };
50 52
51 } // namespace domain_reliability 53 } // namespace domain_reliability
52 54
53 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ 55 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/beacon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698