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

Unified Diff: net/http/http_cache_transaction.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: Fix comments 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
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 675564f3e0e83efaa6e3f019bd62b248aa4a10c4..a10cf981c6c7daf0ecd88399346dbc5e4b74234e 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -282,8 +282,7 @@ int HttpCache::Transaction::RestartWithCertificate(
}
int HttpCache::Transaction::RestartWithAuth(
- const string16& username,
- const string16& password,
+ const AuthCredentials& credentials,
OldCompletionCallback* callback) {
DCHECK(auth_response_.headers);
DCHECK(callback);
@@ -297,7 +296,7 @@ int HttpCache::Transaction::RestartWithAuth(
// Clear the intermediate response since we are going to start over.
auth_response_ = HttpResponseInfo();
- int rv = RestartNetworkRequestWithAuth(username, password);
+ int rv = RestartNetworkRequestWithAuth(credentials);
if (rv == ERR_IO_PENDING)
callback_ = callback;
@@ -1680,14 +1679,13 @@ int HttpCache::Transaction::RestartNetworkRequestWithCertificate(
}
int HttpCache::Transaction::RestartNetworkRequestWithAuth(
- const string16& username,
- const string16& password) {
+ const AuthCredentials& credentials) {
DCHECK(mode_ & WRITE || mode_ == NONE);
DCHECK(network_trans_.get());
DCHECK_EQ(STATE_NONE, next_state_);
next_state_ = STATE_SEND_REQUEST_COMPLETE;
- int rv = network_trans_->RestartWithAuth(username, password, &io_callback_);
+ int rv = network_trans_->RestartWithAuth(credentials, &io_callback_);
if (rv != ERR_IO_PENDING)
return DoLoop(rv);
return rv;
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698