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

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: Fixed external handling order change for request start and redirects. Created 4 years, 5 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 } 820 }
821 821
822 void URLRequest::FollowDeferredRedirect() { 822 void URLRequest::FollowDeferredRedirect() {
823 DCHECK(job_.get()); 823 DCHECK(job_.get());
824 DCHECK(status_.is_success()); 824 DCHECK(status_.is_success());
825 825
826 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 826 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
827 job_->FollowDeferredRedirect(); 827 job_->FollowDeferredRedirect();
828 } 828 }
829 829
830 const GURL& URLRequest::GetDeferredRedirectUrl() {
831 DCHECK(job_.get());
832 DCHECK(status_.is_success());
833 DCHECK(is_redirecting_);
834
835 return job_->deferred_redirect_info().new_url;
836 }
837
830 void URLRequest::SetAuth(const AuthCredentials& credentials) { 838 void URLRequest::SetAuth(const AuthCredentials& credentials) {
831 DCHECK(job_.get()); 839 DCHECK(job_.get());
832 DCHECK(job_->NeedsAuth()); 840 DCHECK(job_->NeedsAuth());
833 841
834 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); 842 status_ = URLRequestStatus::FromError(ERR_IO_PENDING);
835 job_->SetAuth(credentials); 843 job_->SetAuth(credentials);
836 } 844 }
837 845
838 void URLRequest::CancelAuth() { 846 void URLRequest::CancelAuth() {
839 DCHECK(job_.get()); 847 DCHECK(job_.get());
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 } 1188 }
1181 1189
1182 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { 1190 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const {
1183 if (job_) 1191 if (job_)
1184 job_->GetConnectionAttempts(out); 1192 job_->GetConnectionAttempts(out);
1185 else 1193 else
1186 out->clear(); 1194 out->clear();
1187 } 1195 }
1188 1196
1189 } // namespace net 1197 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698