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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |