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

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: Addressed all jam@ latest comments. Created 3 years, 11 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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 void URLRequest::FollowDeferredRedirect() { 852 void URLRequest::FollowDeferredRedirect() {
853 DCHECK(job_.get()); 853 DCHECK(job_.get());
854 DCHECK(status_.is_success()); 854 DCHECK(status_.is_success());
855 855
856 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 856 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
857 job_->FollowDeferredRedirect(); 857 job_->FollowDeferredRedirect();
858 } 858 }
859 859
860 const GURL& URLRequest::GetDeferredRedirectUrl() {
861 DCHECK(job_.get());
862 DCHECK(status_.is_success());
863 DCHECK(is_redirecting_);
864
865 return job_->deferred_redirect_info().new_url;
866 }
867
860 void URLRequest::SetAuth(const AuthCredentials& credentials) { 868 void URLRequest::SetAuth(const AuthCredentials& credentials) {
861 DCHECK(job_.get()); 869 DCHECK(job_.get());
862 DCHECK(job_->NeedsAuth()); 870 DCHECK(job_->NeedsAuth());
863 871
864 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 872 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
865 job_->SetAuth(credentials); 873 job_->SetAuth(credentials);
866 } 874 }
867 875
868 void URLRequest::CancelAuth() { 876 void URLRequest::CancelAuth() {
869 DCHECK(job_.get()); 877 DCHECK(job_.get());
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 out->clear(); 1223 out->clear();
1216 } 1224 }
1217 1225
1218 void URLRequest::set_status(URLRequestStatus status) { 1226 void URLRequest::set_status(URLRequestStatus status) {
1219 DCHECK(status_.is_io_pending() || status_.is_success() || 1227 DCHECK(status_.is_io_pending() || status_.is_success() ||
1220 (!status.is_success() && !status.is_io_pending())); 1228 (!status.is_success() && !status.is_io_pending()));
1221 status_ = status; 1229 status_ = status;
1222 } 1230 }
1223 1231
1224 } // namespace net 1232 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698