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

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

Issue 1327763003: Added and implemented URLRequest::GetTotalSentBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spdy_sent_bytes_impl
Patch Set: Addressed nits Created 5 years, 3 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
« no previous file with comments | « net/url_request/url_request_job.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/url_request/url_request_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 bool URLRequestJob::GetFullRequestHeaders(HttpRequestHeaders* headers) const { 148 bool URLRequestJob::GetFullRequestHeaders(HttpRequestHeaders* headers) const {
149 // Most job types don't send request headers. 149 // Most job types don't send request headers.
150 return false; 150 return false;
151 } 151 }
152 152
153 int64 URLRequestJob::GetTotalReceivedBytes() const { 153 int64 URLRequestJob::GetTotalReceivedBytes() const {
154 return 0; 154 return 0;
155 } 155 }
156 156
157 int64_t URLRequestJob::GetTotalSentBytes() const {
158 return 0;
159 }
160
157 LoadState URLRequestJob::GetLoadState() const { 161 LoadState URLRequestJob::GetLoadState() const {
158 return LOAD_STATE_IDLE; 162 return LOAD_STATE_IDLE;
159 } 163 }
160 164
161 UploadProgress URLRequestJob::GetUploadProgress() const { 165 UploadProgress URLRequestJob::GetUploadProgress() const {
162 return UploadProgress(); 166 return UploadProgress();
163 } 167 }
164 168
165 bool URLRequestJob::GetCharset(std::string* charset) { 169 bool URLRequestJob::GetCharset(std::string* charset) {
166 return false; 170 return false;
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 int64_t total_received_bytes = GetTotalReceivedBytes(); 940 int64_t total_received_bytes = GetTotalReceivedBytes();
937 DCHECK_GE(total_received_bytes, last_notified_total_received_bytes_); 941 DCHECK_GE(total_received_bytes, last_notified_total_received_bytes_);
938 if (total_received_bytes > last_notified_total_received_bytes_) { 942 if (total_received_bytes > last_notified_total_received_bytes_) {
939 network_delegate_->NotifyNetworkBytesReceived( 943 network_delegate_->NotifyNetworkBytesReceived(
940 *request_, total_received_bytes - last_notified_total_received_bytes_); 944 *request_, total_received_bytes - last_notified_total_received_bytes_);
941 } 945 }
942 last_notified_total_received_bytes_ = total_received_bytes; 946 last_notified_total_received_bytes_ = total_received_bytes;
943 } 947 }
944 948
945 } // namespace net 949 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698