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

Unified Diff: net/url_request/url_request.cc

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: mac compile fix Created 9 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index b46b6cc954886a60ed845cf3e033f0e81e29ca2a..20f0b9c1c322cadf4e17d33bcf04c77b44956aff 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -616,11 +616,11 @@ void URLRequest::FollowDeferredRedirect() {
job_->FollowDeferredRedirect();
}
-void URLRequest::SetAuth(const string16& username, const string16& password) {
+void URLRequest::SetAuth(const AuthCredentials& credentials) {
DCHECK(job_);
DCHECK(job_->NeedsAuth());
- job_->SetAuth(username, password);
+ job_->SetAuth(credentials);
}
void URLRequest::CancelAuth() {
@@ -819,7 +819,7 @@ void URLRequest::NotifyAuthRequiredComplete(
break;
case NetworkDelegate::AUTH_REQUIRED_RESPONSE_SET_AUTH:
- SetAuth(credentials.username, credentials.password);
+ SetAuth(credentials);
break;
case NetworkDelegate::AUTH_REQUIRED_RESPONSE_CANCEL_AUTH:

Powered by Google App Engine
This is Rietveld 408576698