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

Unified Diff: net/http/http_auth_handler.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_auth_handler.h ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler.cc
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index 3ba410958443947508866e74668e5d1932f398bc..c196b852cfb748e05da799b9ca1bd463ae20656b 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -62,20 +62,18 @@ NetLog::EventType EventTypeFromAuthTarget(HttpAuth::Target target) {
} // namespace
-int HttpAuthHandler::GenerateAuthToken(const string16* username,
- const string16* password,
+int HttpAuthHandler::GenerateAuthToken(const AuthCredentials* credentials,
const HttpRequestInfo* request,
OldCompletionCallback* callback,
std::string* auth_token) {
// TODO(cbentzel): Enforce non-NULL callback after cleaning up SocketStream.
DCHECK(request);
- DCHECK((username == NULL) == (password == NULL));
- DCHECK(username != NULL || AllowsDefaultCredentials());
+ DCHECK(credentials != NULL || AllowsDefaultCredentials());
DCHECK(auth_token != NULL);
DCHECK(original_callback_ == NULL);
original_callback_ = callback;
net_log_.BeginEvent(EventTypeFromAuthTarget(target_), NULL);
- int rv = GenerateAuthTokenImpl(username, password, request,
+ int rv = GenerateAuthTokenImpl(credentials, request,
&wrapper_callback_, auth_token);
if (rv != ERR_IO_PENDING)
FinishGenerateAuthToken();
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698