| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 void URLRequest::set_first_party_url_policy( | 467 void URLRequest::set_first_party_url_policy( |
| 468 FirstPartyURLPolicy first_party_url_policy) { | 468 FirstPartyURLPolicy first_party_url_policy) { |
| 469 DCHECK(!is_pending_); | 469 DCHECK(!is_pending_); |
| 470 first_party_url_policy_ = first_party_url_policy; | 470 first_party_url_policy_ = first_party_url_policy; |
| 471 } | 471 } |
| 472 | 472 |
| 473 void URLRequest::set_initiator(const base::Optional<url::Origin>& initiator) { | 473 void URLRequest::set_initiator(const base::Optional<url::Origin>& initiator) { |
| 474 DCHECK(!is_pending_); | 474 DCHECK(!is_pending_); |
| 475 DCHECK(!initiator.has_value() || initiator.value().unique() || | 475 DCHECK(!initiator.has_value() || initiator.value().opaque() || |
| 476 initiator.value().GetURL().is_valid()); | 476 initiator.value().GetURL().is_valid()); |
| 477 initiator_ = initiator; | 477 initiator_ = initiator; |
| 478 } | 478 } |
| 479 | 479 |
| 480 void URLRequest::set_method(const std::string& method) { | 480 void URLRequest::set_method(const std::string& method) { |
| 481 DCHECK(!is_pending_); | 481 DCHECK(!is_pending_); |
| 482 method_ = method; | 482 method_ = method; |
| 483 } | 483 } |
| 484 | 484 |
| 485 void URLRequest::SetReferrer(const std::string& referrer) { | 485 void URLRequest::SetReferrer(const std::string& referrer) { |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 out->clear(); | 1216 out->clear(); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 void URLRequest::set_status(URLRequestStatus status) { | 1219 void URLRequest::set_status(URLRequestStatus status) { |
| 1220 DCHECK(status_.is_io_pending() || status_.is_success() || | 1220 DCHECK(status_.is_io_pending() || status_.is_success() || |
| 1221 (!status.is_success() && !status.is_io_pending())); | 1221 (!status.is_success() && !status.is_io_pending())); |
| 1222 status_ = status; | 1222 status_ = status; |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 } // namespace net | 1225 } // namespace net |
| OLD | NEW |