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/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/power_monitor/power_monitor.h" | 10 #include "base/power_monitor/power_monitor.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return HostPortPair(); | 266 return HostPortPair(); |
267 } | 267 } |
268 | 268 |
269 void URLRequestJob::OnSuspend() { | 269 void URLRequestJob::OnSuspend() { |
270 Kill(); | 270 Kill(); |
271 } | 271 } |
272 | 272 |
273 void URLRequestJob::NotifyURLRequestDestroyed() { | 273 void URLRequestJob::NotifyURLRequestDestroyed() { |
274 } | 274 } |
275 | 275 |
| 276 void URLRequestJob::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 277 out->clear(); |
| 278 } |
| 279 |
276 // static | 280 // static |
277 GURL URLRequestJob::ComputeReferrerForRedirect( | 281 GURL URLRequestJob::ComputeReferrerForRedirect( |
278 URLRequest::ReferrerPolicy policy, | 282 URLRequest::ReferrerPolicy policy, |
279 const std::string& referrer, | 283 const std::string& referrer, |
280 const GURL& redirect_destination) { | 284 const GURL& redirect_destination) { |
281 GURL original_referrer(referrer); | 285 GURL original_referrer(referrer); |
282 bool secure_referrer_but_insecure_destination = | 286 bool secure_referrer_but_insecure_destination = |
283 original_referrer.SchemeIsCryptographic() && | 287 original_referrer.SchemeIsCryptographic() && |
284 !redirect_destination.SchemeIsCryptographic(); | 288 !redirect_destination.SchemeIsCryptographic(); |
285 bool same_origin = | 289 bool same_origin = |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS). | 867 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS). |
864 redirect_info.new_referrer = | 868 redirect_info.new_referrer = |
865 ComputeReferrerForRedirect(request_->referrer_policy(), | 869 ComputeReferrerForRedirect(request_->referrer_policy(), |
866 request_->referrer(), | 870 request_->referrer(), |
867 redirect_info.new_url).spec(); | 871 redirect_info.new_url).spec(); |
868 | 872 |
869 return redirect_info; | 873 return redirect_info; |
870 } | 874 } |
871 | 875 |
872 } // namespace net | 876 } // namespace net |
OLD | NEW |