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

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

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Rebase after 3 spin off CLs landed. Created 3 years, 12 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 848 }
849 849
850 void URLRequest::FollowDeferredRedirect() { 850 void URLRequest::FollowDeferredRedirect() {
851 DCHECK(job_.get()); 851 DCHECK(job_.get());
852 DCHECK(status_.is_success()); 852 DCHECK(status_.is_success());
853 853
854 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 854 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
855 job_->FollowDeferredRedirect(); 855 job_->FollowDeferredRedirect();
856 } 856 }
857 857
858 const GURL& URLRequest::GetDeferredRedirectUrl() {
859 DCHECK(job_.get());
860 DCHECK(status_.is_success());
861 DCHECK(is_redirecting_);
862
863 return job_->deferred_redirect_info().new_url;
864 }
865
858 void URLRequest::SetAuth(const AuthCredentials& credentials) { 866 void URLRequest::SetAuth(const AuthCredentials& credentials) {
859 DCHECK(job_.get()); 867 DCHECK(job_.get());
860 DCHECK(job_->NeedsAuth()); 868 DCHECK(job_->NeedsAuth());
861 869
862 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 870 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
863 job_->SetAuth(credentials); 871 job_->SetAuth(credentials);
864 } 872 }
865 873
866 void URLRequest::CancelAuth() { 874 void URLRequest::CancelAuth() {
867 DCHECK(job_.get()); 875 DCHECK(job_.get());
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 out->clear(); 1222 out->clear();
1215 } 1223 }
1216 1224
1217 void URLRequest::set_status(URLRequestStatus status) { 1225 void URLRequest::set_status(URLRequestStatus status) {
1218 DCHECK(status_.is_io_pending() || status_.is_success() || 1226 DCHECK(status_.is_io_pending() || status_.is_success() ||
1219 (!status.is_success() && !status.is_io_pending())); 1227 (!status.is_success() && !status.is_io_pending()));
1220 status_ = status; 1228 status_ = status;
1221 } 1229 }
1222 1230
1223 } // namespace net 1231 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698