| 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.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 // TODO(jww): This is a layering violation and should be refactored somewhere | 971 // TODO(jww): This is a layering violation and should be refactored somewhere |
| 972 // up into //net's embedder. https://crbug.com/471397 | 972 // up into //net's embedder. https://crbug.com/471397 |
| 973 if (!url::Origin(redirect_info.new_url) | 973 if (!url::Origin(redirect_info.new_url) |
| 974 .IsSameOriginWith(url::Origin(url())) && | 974 .IsSameOriginWith(url::Origin(url())) && |
| 975 extra_request_headers_.HasHeader(HttpRequestHeaders::kOrigin)) { | 975 extra_request_headers_.HasHeader(HttpRequestHeaders::kOrigin)) { |
| 976 extra_request_headers_.SetHeader(HttpRequestHeaders::kOrigin, | 976 extra_request_headers_.SetHeader(HttpRequestHeaders::kOrigin, |
| 977 url::Origin().Serialize()); | 977 url::Origin().Serialize()); |
| 978 } | 978 } |
| 979 | 979 |
| 980 referrer_ = redirect_info.new_referrer; | 980 referrer_ = redirect_info.new_referrer; |
| 981 referrer_policy_ = redirect_info.new_referrer_policy; |
| 981 first_party_for_cookies_ = redirect_info.new_first_party_for_cookies; | 982 first_party_for_cookies_ = redirect_info.new_first_party_for_cookies; |
| 982 token_binding_referrer_ = redirect_info.referred_token_binding_host; | 983 token_binding_referrer_ = redirect_info.referred_token_binding_host; |
| 983 | 984 |
| 984 url_chain_.push_back(redirect_info.new_url); | 985 url_chain_.push_back(redirect_info.new_url); |
| 985 --redirect_limit_; | 986 --redirect_limit_; |
| 986 | 987 |
| 987 Start(); | 988 Start(); |
| 988 return OK; | 989 return OK; |
| 989 } | 990 } |
| 990 | 991 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 } | 1187 } |
| 1187 | 1188 |
| 1188 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1189 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 1189 if (job_) | 1190 if (job_) |
| 1190 job_->GetConnectionAttempts(out); | 1191 job_->GetConnectionAttempts(out); |
| 1191 else | 1192 else |
| 1192 out->clear(); | 1193 out->clear(); |
| 1193 } | 1194 } |
| 1194 | 1195 |
| 1195 } // namespace net | 1196 } // namespace net |
| OLD | NEW |