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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 DCHECK(!is_pending_); | 453 DCHECK(!is_pending_); |
454 first_party_for_cookies_ = first_party_for_cookies; | 454 first_party_for_cookies_ = first_party_for_cookies; |
455 } | 455 } |
456 | 456 |
457 void URLRequest::set_first_party_url_policy( | 457 void URLRequest::set_first_party_url_policy( |
458 FirstPartyURLPolicy first_party_url_policy) { | 458 FirstPartyURLPolicy first_party_url_policy) { |
459 DCHECK(!is_pending_); | 459 DCHECK(!is_pending_); |
460 first_party_url_policy_ = first_party_url_policy; | 460 first_party_url_policy_ = first_party_url_policy; |
461 } | 461 } |
462 | 462 |
| 463 void URLRequest::set_requestor_origin(const url::Origin& requestor_origin) { |
| 464 DCHECK(!is_pending_); |
| 465 requestor_origin_ = requestor_origin; |
| 466 } |
| 467 |
463 void URLRequest::set_method(const std::string& method) { | 468 void URLRequest::set_method(const std::string& method) { |
464 DCHECK(!is_pending_); | 469 DCHECK(!is_pending_); |
465 method_ = method; | 470 method_ = method; |
466 } | 471 } |
467 | 472 |
468 void URLRequest::SetReferrer(const std::string& referrer) { | 473 void URLRequest::SetReferrer(const std::string& referrer) { |
469 DCHECK(!is_pending_); | 474 DCHECK(!is_pending_); |
470 GURL referrer_url(referrer); | 475 GURL referrer_url(referrer); |
471 if (referrer_url.is_valid()) { | 476 if (referrer_url.is_valid()) { |
472 referrer_ = referrer_url.GetAsReferrer().spec(); | 477 referrer_ = referrer_url.GetAsReferrer().spec(); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 } | 1191 } |
1187 | 1192 |
1188 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1193 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
1189 if (job_) | 1194 if (job_) |
1190 job_->GetConnectionAttempts(out); | 1195 job_->GetConnectionAttempts(out); |
1191 else | 1196 else |
1192 out->clear(); | 1197 out->clear(); |
1193 } | 1198 } |
1194 | 1199 |
1195 } // namespace net | 1200 } // namespace net |
OLD | NEW |