| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 request_->Cancel(); | 353 request_->Cancel(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void URLRequestJob::NotifyURLRequestDestroyed() { | 356 void URLRequestJob::NotifyURLRequestDestroyed() { |
| 357 } | 357 } |
| 358 | 358 |
| 359 void URLRequestJob::GetConnectionAttempts(ConnectionAttempts* out) const { | 359 void URLRequestJob::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 360 out->clear(); | 360 out->clear(); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void URLRequestJob::DumpMemoryStats( |
| 364 base::trace_event::MemoryAllocatorDump* dump) const { |
| 365 if (source_stream_) |
| 366 source_stream_->DumpMemoryStats(dump); |
| 367 } |
| 368 |
| 363 // static | 369 // static |
| 364 GURL URLRequestJob::ComputeReferrerForRedirect( | 370 GURL URLRequestJob::ComputeReferrerForRedirect( |
| 365 URLRequest::ReferrerPolicy policy, | 371 URLRequest::ReferrerPolicy policy, |
| 366 const GURL& original_referrer, | 372 const GURL& original_referrer, |
| 367 const GURL& redirect_destination) { | 373 const GURL& redirect_destination) { |
| 368 bool secure_referrer_but_insecure_destination = | 374 bool secure_referrer_but_insecure_destination = |
| 369 original_referrer.SchemeIsCryptographic() && | 375 original_referrer.SchemeIsCryptographic() && |
| 370 !redirect_destination.SchemeIsCryptographic(); | 376 !redirect_destination.SchemeIsCryptographic(); |
| 371 url::Origin referrer_origin(original_referrer); | 377 url::Origin referrer_origin(original_referrer); |
| 372 bool same_origin = | 378 bool same_origin = |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 int64_t total_sent_bytes = GetTotalSentBytes(); | 848 int64_t total_sent_bytes = GetTotalSentBytes(); |
| 843 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); | 849 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); |
| 844 if (total_sent_bytes > last_notified_total_sent_bytes_) { | 850 if (total_sent_bytes > last_notified_total_sent_bytes_) { |
| 845 network_delegate_->NotifyNetworkBytesSent( | 851 network_delegate_->NotifyNetworkBytesSent( |
| 846 request_, total_sent_bytes - last_notified_total_sent_bytes_); | 852 request_, total_sent_bytes - last_notified_total_sent_bytes_); |
| 847 } | 853 } |
| 848 last_notified_total_sent_bytes_ = total_sent_bytes; | 854 last_notified_total_sent_bytes_ = total_sent_bytes; |
| 849 } | 855 } |
| 850 | 856 |
| 851 } // namespace net | 857 } // namespace net |
| OLD | NEW |