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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 uint32 load_size() const { return load_size_; } | 144 uint32 load_size() const { return load_size_; } |
| 145 | 145 |
| 146 // Helper methods to get and set |socket_|. | 146 // Helper methods to get and set |socket_|. |
| 147 net::Socket* socket() { return socket_.get(); } | 147 net::Socket* socket() { return socket_.get(); } |
| 148 void set_socket(net::Socket* socket); | 148 void set_socket(net::Socket* socket); |
| 149 | 149 |
| 150 // Returns |start_time_| (used by histograms). | 150 // Returns |start_time_| (used by histograms). |
| 151 base::TimeTicks start_time() const { return start_time_; } | 151 base::TimeTicks start_time() const { return start_time_; } |
| 152 | 152 |
| 153 // Returns |addresses_|. | 153 // Returns |addresses_|. |
| 154 net::AddressList GetAddressList() const { return addresses_; } | 154 const net::AddressList& get_address_list() const { return addresses_; } |
|
eroman
2012/05/04 19:37:36
Why not call this addresses()?
our hacker style f
szym
2012/05/04 20:20:21
Of course! Wasn't thinking.
| |
| 155 | 155 |
| 156 // Returns packets_received_mask_ (used by unit tests). | 156 // Returns packets_received_mask_ (used by unit tests). |
| 157 uint32 packets_received_mask() const { return packets_received_mask_; } | 157 uint32 packets_received_mask() const { return packets_received_mask_; } |
| 158 | 158 |
| 159 // Collect the following network connectivity stats. | 159 // Collect the following network connectivity stats. |
| 160 // a) What percentage of users can get a message end-to-end to a TCP/UDP | 160 // a) What percentage of users can get a message end-to-end to a TCP/UDP |
| 161 // server and if connectivity failed, at what stage (Connect or Write or Read) | 161 // server and if connectivity failed, at what stage (Connect or Write or Read) |
| 162 // did it fail? | 162 // did it fail? |
| 163 // b) What is RTT for the echo message. | 163 // b) What is RTT for the echo message. |
| 164 void RecordHistograms(const ProtocolValue& protocol, | 164 void RecordHistograms(const ProtocolValue& protocol, |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 // This collects the network connectivity stats for UDP and TCP for small | 351 // This collects the network connectivity stats for UDP and TCP for small |
| 352 // percentage of users who are participating in the experiment. All users must | 352 // percentage of users who are participating in the experiment. All users must |
| 353 // have enabled "UMA upload". This method gets called only if UMA upload to the | 353 // have enabled "UMA upload". This method gets called only if UMA upload to the |
| 354 // server has succeeded. | 354 // server has succeeded. |
| 355 void CollectNetworkStats(const std::string& network_stats_server_url, | 355 void CollectNetworkStats(const std::string& network_stats_server_url, |
| 356 IOThread* io_thread); | 356 IOThread* io_thread); |
| 357 | 357 |
| 358 } // namespace chrome_browser_net | 358 } // namespace chrome_browser_net |
| 359 | 359 |
| 360 #endif // CHROME_BROWSER_NET_NETWORK_STATS_H_ | 360 #endif // CHROME_BROWSER_NET_NETWORK_STATS_H_ |
| OLD | NEW |