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

Unified Diff: net/url_request/url_request_job.cc

Issue 40319: Use filter context to track stats better in SDCH filtering (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_job.h ('k') | net/url_request/url_request_job_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.cc
===================================================================
--- net/url_request/url_request_job.cc (revision 11636)
+++ net/url_request/url_request_job.cc (working copy)
@@ -28,7 +28,8 @@
read_buffer_(NULL),
read_buffer_len_(0),
has_handled_response_(false),
- expected_content_size_(-1) {
+ expected_content_size_(-1),
+ filter_input_byte_count_(0) {
is_profiling_ = request->enable_profiling();
if (is_profiling()) {
metrics_.reset(new URLRequestJobMetrics());
@@ -86,6 +87,10 @@
NOTREACHED();
}
+int64 URLRequestJob::GetByteReadCount() const {
+ return filter_input_byte_count_ ;
+}
+
bool URLRequestJob::GetURL(GURL* gurl) const {
if (!request_)
return false;
@@ -505,6 +510,7 @@
++(metrics_->number_of_read_IO_);
metrics_->total_bytes_read_ += bytes_read;
}
+ filter_input_byte_count_ += bytes_read;
g_url_request_job_tracker.OnBytesRead(this, bytes_read);
}
« no previous file with comments | « net/url_request/url_request_job.h ('k') | net/url_request/url_request_job_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698