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

Unified Diff: net/http/http_auth_handler_digest.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_basic_unittest.cc ('k') | net/http/http_auth_handler_digest_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_digest.cc
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index a8e301a02e89828d848eccbfd2b4491402ef419c..e0a1ef687bdfe9baccd534b7ce02540c55b1a30c 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -322,9 +322,9 @@ std::string HttpAuthHandlerDigest::AssembleResponseDigest(
const std::string& nc) const {
// ha1 = MD5(A1)
// TODO(eroman): is this the right encoding?
- std::string ha1 = base::MD5String(UTF16ToUTF8(credentials.username()) + ":" +
- original_realm_ + ":" +
- UTF16ToUTF8(credentials.password()));
+ std::string ha1 = base::MD5String(base::UTF16ToUTF8(credentials.username()) +
+ ":" + original_realm_ + ":" +
+ base::UTF16ToUTF8(credentials.password()));
if (algorithm_ == HttpAuthHandlerDigest::ALGORITHM_MD5_SESS)
ha1 = base::MD5String(ha1 + ":" + nonce_ + ":" + cnonce);
@@ -352,7 +352,7 @@ std::string HttpAuthHandlerDigest::AssembleCredentials(
// TODO(eroman): is this the right encoding?
std::string authorization = (std::string("Digest username=") +
HttpUtil::Quote(
- UTF16ToUTF8(credentials.username())));
+ base::UTF16ToUTF8(credentials.username())));
authorization += ", realm=" + HttpUtil::Quote(original_realm_);
authorization += ", nonce=" + HttpUtil::Quote(nonce_);
authorization += ", uri=" + HttpUtil::Quote(path);
« no previous file with comments | « net/http/http_auth_handler_basic_unittest.cc ('k') | net/http/http_auth_handler_digest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698