Index: net/http/http_auth_handler_basic.cc |
diff --git a/net/http/http_auth_handler_basic.cc b/net/http/http_auth_handler_basic.cc |
index 5303ac34f2a83a482ed0e1a37f91b42e2820ec82..df24d0e89656c4df8b2a25f5e5430fdc414f91e2 100644 |
--- a/net/http/http_auth_handler_basic.cc |
+++ b/net/http/http_auth_handler_basic.cc |
@@ -86,15 +86,17 @@ HttpAuth::AuthorizationResult HttpAuthHandlerBasic::HandleAnotherChallenge( |
} |
int HttpAuthHandlerBasic::GenerateAuthTokenImpl( |
- const string16* username, |
- const string16* password, |
+ const AuthCredentials* credentials, |
const HttpRequestInfo*, |
OldCompletionCallback*, |
std::string* auth_token) { |
+ DCHECK(credentials); |
// TODO(eroman): is this the right encoding of username/password? |
std::string base64_username_password; |
- if (!base::Base64Encode(UTF16ToUTF8(*username) + ":" + UTF16ToUTF8(*password), |
- &base64_username_password)) { |
+ if (!base::Base64Encode( |
+ UTF16ToUTF8(credentials->username()) + ":" + |
+ UTF16ToUTF8(credentials->password()), |
+ &base64_username_password)) { |
LOG(ERROR) << "Unexpected problem Base64 encoding."; |
return ERR_UNEXPECTED; |
} |