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

Side by Side Diff: net/url_request/url_request_job.h

Issue 1080763003: Remove URLRequestJob::filter_input_byte_count_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 (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 NET_URL_REQUEST_URL_REQUEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 // The status of the job. 333 // The status of the job.
334 const URLRequestStatus GetStatus(); 334 const URLRequestStatus GetStatus();
335 335
336 // Set the status of the job. 336 // Set the status of the job.
337 void SetStatus(const URLRequestStatus& status); 337 void SetStatus(const URLRequestStatus& status);
338 338
339 // Set the proxy server that was used, if any. 339 // Set the proxy server that was used, if any.
340 void SetProxyServer(const HostPortPair& proxy_server); 340 void SetProxyServer(const HostPortPair& proxy_server);
341 341
342 // The number of bytes read before passing to the filter. 342 // The number of bytes read before passing to the filter. Include bytes
343 // when there is no filter.
Randy Smith (Not in Mondays) 2015/04/10 22:03:58 nit: This doesn't feel like a complete sentence to
mmenke 2015/04/10 22:36:49 Done.
343 int prefilter_bytes_read() const { return prefilter_bytes_read_; } 344 int prefilter_bytes_read() const { return prefilter_bytes_read_; }
344 345
345 // The number of bytes read after passing through the filter. 346 // The number of bytes read after passing through the filter. Include bytes
347 // when there is no filter.
346 int postfilter_bytes_read() const { return postfilter_bytes_read_; } 348 int postfilter_bytes_read() const { return postfilter_bytes_read_; }
347 349
348 // Total number of bytes read from network (or cache) and typically handed
349 // to filter to process. Used to histogram compression ratios, and error
350 // recovery scenarios in filters.
351 int64 filter_input_byte_count() const { return filter_input_byte_count_; }
352
353 // The request that initiated this job. This value MAY BE NULL if the 350 // The request that initiated this job. This value MAY BE NULL if the
354 // request was released by DetachRequest(). 351 // request was released by DetachRequest().
355 URLRequest* request_; 352 URLRequest* request_;
356 353
357 private: 354 private:
358 // When data filtering is enabled, this function is used to read data 355 // When data filtering is enabled, this function is used to read data
359 // for the filter. Returns true if raw data was read. Returns false if 356 // for the filter. Returns true if raw data was read. Returns false if
360 // an error occurred (or we are waiting for IO to complete). 357 // an error occurred (or we are waiting for IO to complete).
361 bool ReadRawDataForFilter(int *bytes_read); 358 bool ReadRawDataForFilter(int *bytes_read);
362 359
(...skipping 28 matching lines...) Expand all
391 // |location| and |http_status_code|. 388 // |location| and |http_status_code|.
392 RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code); 389 RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code);
393 390
394 // Indicates that the job is done producing data, either it has completed 391 // Indicates that the job is done producing data, either it has completed
395 // all the data or an error has been encountered. Set exclusively by 392 // all the data or an error has been encountered. Set exclusively by
396 // NotifyDone so that it is kept in sync with the request. 393 // NotifyDone so that it is kept in sync with the request.
397 bool done_; 394 bool done_;
398 395
399 int prefilter_bytes_read_; 396 int prefilter_bytes_read_;
400 int postfilter_bytes_read_; 397 int postfilter_bytes_read_;
401 int64 filter_input_byte_count_;
402 398
403 // The data stream filter which is enabled on demand. 399 // The data stream filter which is enabled on demand.
404 scoped_ptr<Filter> filter_; 400 scoped_ptr<Filter> filter_;
405 401
406 // If the filter filled its output buffer, then there is a change that it 402 // If the filter filled its output buffer, then there is a change that it
407 // still has internal data to emit, and this flag is set. 403 // still has internal data to emit, and this flag is set.
408 bool filter_needs_more_output_space_; 404 bool filter_needs_more_output_space_;
409 405
410 // When we filter data, we receive data into the filter buffers. After 406 // When we filter data, we receive data into the filter buffers. After
411 // processing the filtered data, we return the data in the caller's buffer. 407 // processing the filtered data, we return the data in the caller's buffer.
(...skipping 20 matching lines...) Expand all
432 NetworkDelegate* network_delegate_; 428 NetworkDelegate* network_delegate_;
433 429
434 base::WeakPtrFactory<URLRequestJob> weak_factory_; 430 base::WeakPtrFactory<URLRequestJob> weak_factory_;
435 431
436 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 432 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
437 }; 433 };
438 434
439 } // namespace net 435 } // namespace net
440 436
441 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 437 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698