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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 void URLRequestJob::StopCaching() { | 144 void URLRequestJob::StopCaching() { |
145 // Nothing to do here. | 145 // Nothing to do here. |
146 } | 146 } |
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_t URLRequestJob::GetTotalReceivedBytes() const { |
154 return 0; | 154 return 0; |
155 } | 155 } |
156 | 156 |
157 int64_t URLRequestJob::GetTotalSentBytes() const { | 157 int64_t URLRequestJob::GetTotalSentBytes() const { |
158 return 0; | 158 return 0; |
159 } | 159 } |
160 | 160 |
161 LoadState URLRequestJob::GetLoadState() const { | 161 LoadState URLRequestJob::GetLoadState() const { |
162 return LOAD_STATE_IDLE; | 162 return LOAD_STATE_IDLE; |
163 } | 163 } |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 int64_t total_received_bytes = GetTotalReceivedBytes(); | 940 int64_t total_received_bytes = GetTotalReceivedBytes(); |
941 DCHECK_GE(total_received_bytes, last_notified_total_received_bytes_); | 941 DCHECK_GE(total_received_bytes, last_notified_total_received_bytes_); |
942 if (total_received_bytes > last_notified_total_received_bytes_) { | 942 if (total_received_bytes > last_notified_total_received_bytes_) { |
943 network_delegate_->NotifyNetworkBytesReceived( | 943 network_delegate_->NotifyNetworkBytesReceived( |
944 *request_, total_received_bytes - last_notified_total_received_bytes_); | 944 *request_, total_received_bytes - last_notified_total_received_bytes_); |
945 } | 945 } |
946 last_notified_total_received_bytes_ = total_received_bytes; | 946 last_notified_total_received_bytes_ = total_received_bytes; |
947 } | 947 } |
948 | 948 |
949 } // namespace net | 949 } // namespace net |
OLD | NEW |