Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_NET_NETWORK_STATS_H_ | 5 #ifndef CHROME_BROWSER_NET_NETWORK_STATS_H_ |
| 6 #define CHROME_BROWSER_NET_NETWORK_STATS_H_ | 6 #define CHROME_BROWSER_NET_NETWORK_STATS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 uint32 load_size() const { return load_size_; } | 142 uint32 load_size() const { return load_size_; } |
| 143 | 143 |
| 144 // Helper methods to get and set |socket_|. | 144 // Helper methods to get and set |socket_|. |
| 145 net::Socket* socket() { return socket_.get(); } | 145 net::Socket* socket() { return socket_.get(); } |
| 146 void set_socket(net::Socket* socket); | 146 void set_socket(net::Socket* socket); |
| 147 | 147 |
| 148 // Returns |start_time_| (used by histograms). | 148 // Returns |start_time_| (used by histograms). |
| 149 base::TimeTicks start_time() const { return start_time_; } | 149 base::TimeTicks start_time() const { return start_time_; } |
| 150 | 150 |
| 151 // Returns |addresses_|. | 151 // Returns |addresses_|. |
| 152 net::AddressList GetAddressList() const { return addresses_; } | 152 const net::AddressList& GetAddressList() const { return addresses_; } |
|
eroman
2012/05/04 01:08:41
might want to add a TODO to rename this to address
szym
2012/05/04 05:27:55
Actually, renamed to get_address_list (only used i
| |
| 153 | 153 |
| 154 // Collect the following network connectivity stats. | 154 // Collect the following network connectivity stats. |
| 155 // a) What percentage of users can get a message end-to-end to a TCP/UDP | 155 // a) What percentage of users can get a message end-to-end to a TCP/UDP |
| 156 // server and if connectivity failed, at what stage (Connect or Write or Read) | 156 // server and if connectivity failed, at what stage (Connect or Write or Read) |
| 157 // did it fail? | 157 // did it fail? |
| 158 // b) What is RTT for the echo message. | 158 // b) What is RTT for the echo message. |
| 159 void RecordHistograms(const ProtocolValue& protocol, | 159 void RecordHistograms(const ProtocolValue& protocol, |
| 160 const Status& status, | 160 const Status& status, |
| 161 int result); | 161 int result); |
| 162 | 162 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 327 // This collects the network connectivity stats for UDP and TCP for small | 327 // This collects the network connectivity stats for UDP and TCP for small |
| 328 // percentage of users who are participating in the experiment. All users must | 328 // percentage of users who are participating in the experiment. All users must |
| 329 // have enabled "UMA upload". This method gets called only if UMA upload to the | 329 // have enabled "UMA upload". This method gets called only if UMA upload to the |
| 330 // server has succeeded. | 330 // server has succeeded. |
| 331 void CollectNetworkStats(const std::string& network_stats_server_url, | 331 void CollectNetworkStats(const std::string& network_stats_server_url, |
| 332 IOThread* io_thread); | 332 IOThread* io_thread); |
| 333 | 333 |
| 334 } // namespace chrome_browser_net | 334 } // namespace chrome_browser_net |
| 335 | 335 |
| 336 #endif // CHROME_BROWSER_NET_NETWORK_STATS_H_ | 336 #endif // CHROME_BROWSER_NET_NETWORK_STATS_H_ |
| OLD | NEW |