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

Unified Diff: net/http/http_auth_handler_ntlm.cc

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | net/http/http_auth_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm.cc
===================================================================
--- net/http/http_auth_handler_ntlm.cc (revision 53997)
+++ net/http/http_auth_handler_ntlm.cc (working copy)
@@ -14,8 +14,8 @@
namespace net {
int HttpAuthHandlerNTLM::GenerateAuthTokenImpl(
- const std::wstring* username,
- const std::wstring* password,
+ const string16* username,
+ const string16* password,
const HttpRequestInfo* request,
CompletionCallback* callback,
std::string* auth_token) {
@@ -36,8 +36,8 @@
// |username| may be in the form "DOMAIN\user". Parse it into the two
// components.
- std::wstring domain;
- std::wstring user;
+ string16 domain;
+ string16 user;
size_t backslash_idx = username->find(L'\\');
if (backslash_idx == std::wstring::npos) {
user = *username;
@@ -45,9 +45,9 @@
domain = username->substr(0, backslash_idx);
user = username->substr(backslash_idx + 1);
}
- domain_ = WideToUTF16(domain);
- username_ = WideToUTF16(user);
- password_ = WideToUTF16(*password);
+ domain_ = domain;
+ username_ = user;
+ password_ = *password;
// Initial challenge.
if (auth_data_.empty()) {
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | net/http/http_auth_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698