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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 // "null." This matches Firefox and IE behavior, although it supercedes the | 946 // "null." This matches Firefox and IE behavior, although it supercedes the |
947 // suggested behavior in RFC 6454, "The Web Origin Concept." | 947 // suggested behavior in RFC 6454, "The Web Origin Concept." |
948 // | 948 // |
949 // See also https://crbug.com/465517. | 949 // See also https://crbug.com/465517. |
950 // | 950 // |
951 // TODO(jww): This is probably layering violation and should be refactored | 951 // TODO(jww): This is probably layering violation and should be refactored |
952 // into //content. See https://crbug.com/471397. | 952 // into //content. See https://crbug.com/471397. |
953 if (redirect_info.new_url.GetOrigin() != url().GetOrigin() && | 953 if (redirect_info.new_url.GetOrigin() != url().GetOrigin() && |
954 extra_request_headers_.HasHeader(HttpRequestHeaders::kOrigin)) { | 954 extra_request_headers_.HasHeader(HttpRequestHeaders::kOrigin)) { |
955 extra_request_headers_.SetHeader(HttpRequestHeaders::kOrigin, | 955 extra_request_headers_.SetHeader(HttpRequestHeaders::kOrigin, |
956 url::Origin().string()); | 956 url::kUniqueOriginSerialization); |
957 } | 957 } |
958 | 958 |
959 referrer_ = redirect_info.new_referrer; | 959 referrer_ = redirect_info.new_referrer; |
960 first_party_for_cookies_ = redirect_info.new_first_party_for_cookies; | 960 first_party_for_cookies_ = redirect_info.new_first_party_for_cookies; |
961 | 961 |
962 url_chain_.push_back(redirect_info.new_url); | 962 url_chain_.push_back(redirect_info.new_url); |
963 --redirect_limit_; | 963 --redirect_limit_; |
964 | 964 |
965 Start(); | 965 Start(); |
966 return OK; | 966 return OK; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 } | 1190 } |
1191 | 1191 |
1192 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1192 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
1193 if (job_) | 1193 if (job_) |
1194 job_->GetConnectionAttempts(out); | 1194 job_->GetConnectionAttempts(out); |
1195 else | 1195 else |
1196 out->clear(); | 1196 out->clear(); |
1197 } | 1197 } |
1198 | 1198 |
1199 } // namespace net | 1199 } // namespace net |
OLD | NEW |