OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // true packet arrival times in such cases. | 190 // true packet arrival times in such cases. |
191 | 191 |
192 // Enable recording of packet arrival times for histogramming. | 192 // Enable recording of packet arrival times for histogramming. |
193 bool packet_timing_enabled_; | 193 bool packet_timing_enabled_; |
194 bool done_; // True when we are done doing work. | 194 bool done_; // True when we are done doing work. |
195 | 195 |
196 // The number of bytes that have been accounted for in packets (where some of | 196 // The number of bytes that have been accounted for in packets (where some of |
197 // those packets may possibly have had their time of arrival recorded). | 197 // those packets may possibly have had their time of arrival recorded). |
198 int64 bytes_observed_in_packets_; | 198 int64 bytes_observed_in_packets_; |
199 | 199 |
200 // Arrival times for some of the first few packets. | |
201 std::vector<base::Time> packet_times_; | |
202 | |
203 // The request time may not be available when we are being destroyed, so we | 200 // The request time may not be available when we are being destroyed, so we |
204 // snapshot it early on. | 201 // snapshot it early on. |
205 base::Time request_time_snapshot_; | 202 base::Time request_time_snapshot_; |
206 | 203 |
207 // Since we don't save all packet times in packet_times_, we save the | 204 // Since we don't save all packet times in packet_times_, we save the |
208 // last time for use in histograms. | 205 // last time for use in histograms. |
209 base::Time final_packet_time_; | 206 base::Time final_packet_time_; |
210 | 207 |
211 // The start time for the job, ignoring re-starts. | 208 // The start time for the job, ignoring re-starts. |
212 base::TimeTicks start_time_; | 209 base::TimeTicks start_time_; |
213 | 210 |
214 // The count of the number of packets, some of which may not have been timed. | |
215 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. | |
216 int observed_packet_count_; | |
217 | |
218 scoped_ptr<HttpFilterContext> filter_context_; | 211 scoped_ptr<HttpFilterContext> filter_context_; |
219 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; | 212 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; |
220 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; | 213 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; |
221 | 214 |
222 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 215 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
223 }; | 216 }; |
224 | 217 |
225 } // namespace net | 218 } // namespace net |
226 | 219 |
227 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 220 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |