Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: net/url_request/url_request.cc

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Introduce NullableOrigin to use for request initiator Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 DCHECK(!is_pending_); 461 DCHECK(!is_pending_);
462 first_party_for_cookies_ = first_party_for_cookies; 462 first_party_for_cookies_ = first_party_for_cookies;
463 } 463 }
464 464
465 void URLRequest::set_first_party_url_policy( 465 void URLRequest::set_first_party_url_policy(
466 FirstPartyURLPolicy first_party_url_policy) { 466 FirstPartyURLPolicy first_party_url_policy) {
467 DCHECK(!is_pending_); 467 DCHECK(!is_pending_);
468 first_party_url_policy_ = first_party_url_policy; 468 first_party_url_policy_ = first_party_url_policy;
469 } 469 }
470 470
471 void URLRequest::set_initiator(const url::Origin& initiator) { 471 void URLRequest::set_initiator(scoped_refptr<url::NullableOrigin> initiator) {
472 DCHECK(!is_pending_); 472 DCHECK(!is_pending_);
473 initiator_ = initiator; 473 initiator_ = initiator;
474 } 474 }
475 475
476 void URLRequest::set_method(const std::string& method) { 476 void URLRequest::set_method(const std::string& method) {
477 DCHECK(!is_pending_); 477 DCHECK(!is_pending_);
478 method_ = method; 478 method_ = method;
479 } 479 }
480 480
481 void URLRequest::SetReferrer(const std::string& referrer) { 481 void URLRequest::SetReferrer(const std::string& referrer) {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 out->clear(); 1233 out->clear();
1234 } 1234 }
1235 1235
1236 void URLRequest::set_status(URLRequestStatus status) { 1236 void URLRequest::set_status(URLRequestStatus status) {
1237 DCHECK(status_.is_io_pending() || status_.is_success() || 1237 DCHECK(status_.is_io_pending() || status_.is_success() ||
1238 (!status.is_success() && !status.is_io_pending())); 1238 (!status.is_success() && !status.is_io_pending()));
1239 status_ = status; 1239 status_ = status;
1240 } 1240 }
1241 1241
1242 } // namespace net 1242 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698