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

Unified Diff: net/http/http_auth_handler_ntlm.cc

Issue 2808107: Leftovers from wstring->string16 conversion in authentication code. (Closed)
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm.cc
diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc
index 3191df6e992f6d9213b02887ed4714ceb4b097ba..9032bb579c3a0d4f1534387c91c106bece559d1b 100644
--- a/net/http/http_auth_handler_ntlm.cc
+++ b/net/http/http_auth_handler_ntlm.cc
@@ -38,8 +38,9 @@ int HttpAuthHandlerNTLM::GenerateAuthTokenImpl(
// components.
string16 domain;
string16 user;
- size_t backslash_idx = username->find(L'\\');
- if (backslash_idx == std::wstring::npos) {
+ const char16 backslash_character = '\\';
+ size_t backslash_idx = username->find(backslash_character);
+ if (backslash_idx == string16::npos) {
user = *username;
} else {
domain = username->substr(0, backslash_idx);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698