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

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

Issue 2613223002: Remove ScopedVector from base::JSONValueConverter (Closed)
Patch Set: Created 3 years, 11 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
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_vector.h"
12 #include "base/time/time.h" 11 #include "base/time/time.h"
13 #include "components/domain_reliability/domain_reliability_export.h" 12 #include "components/domain_reliability/domain_reliability_export.h"
14 #include "net/base/net_error_details.h" 13 #include "net/base/net_error_details.h"
15 #include "url/gurl.h" 14 #include "url/gurl.h"
16 15
17 namespace base { 16 namespace base {
18 class Value; 17 class Value;
19 } // namespace base 18 } // namespace base
20 19
21 namespace domain_reliability { 20 namespace domain_reliability {
(...skipping 11 matching lines...) Expand all
33 // |last_network_change_time| is used to determine which beacons are 32 // |last_network_change_time| is used to determine which beacons are
34 // labeled as from a previous network connection. 33 // labeled as from a previous network connection.
35 // |collector_url| is compared to the URLs in the beacons to determine which 34 // |collector_url| is compared to the URLs in the beacons to determine which
36 // are being uploaded to a same-origin collector. 35 // are being uploaded to a same-origin collector.
37 // |path_prefixes| are used to include only a known-safe (not PII) prefix of 36 // |path_prefixes| are used to include only a known-safe (not PII) prefix of
38 // URLs when uploading to a non-same-origin collector. 37 // URLs when uploading to a non-same-origin collector.
39 std::unique_ptr<base::Value> ToValue( 38 std::unique_ptr<base::Value> ToValue(
40 base::TimeTicks upload_time, 39 base::TimeTicks upload_time,
41 base::TimeTicks last_network_change_time, 40 base::TimeTicks last_network_change_time,
42 const GURL& collector_url, 41 const GURL& collector_url,
43 const ScopedVector<std::string>& path_prefixes) const; 42 const std::vector<std::unique_ptr<std::string>>& path_prefixes) const;
44 43
45 // The URL that the beacon is reporting on, if included. 44 // The URL that the beacon is reporting on, if included.
46 GURL url; 45 GURL url;
47 // The resource name that the beacon is reporting on, if included. 46 // The resource name that the beacon is reporting on, if included.
48 std::string resource; 47 std::string resource;
49 // Status string (e.g. "ok", "dns.nxdomain", "http.403"). 48 // Status string (e.g. "ok", "dns.nxdomain", "http.403").
50 std::string status; 49 std::string status;
51 // Granular QUIC error string (e.g. "quic.peer_going_away"). 50 // Granular QUIC error string (e.g. "quic.peer_going_away").
52 std::string quic_error; 51 std::string quic_error;
53 // Net error code. Encoded as a string in the final JSON. 52 // Net error code. Encoded as a string in the final JSON.
(...skipping 20 matching lines...) Expand all
74 int upload_depth; 73 int upload_depth;
75 // The probability that this request had of being reported ("sample rate"). 74 // The probability that this request had of being reported ("sample rate").
76 double sample_rate; 75 double sample_rate;
77 76
78 // Okay to copy and assign. 77 // Okay to copy and assign.
79 }; 78 };
80 79
81 } // namespace domain_reliability 80 } // namespace domain_reliability
82 81
83 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ 82 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698