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

Unified Diff: net/http/http_auth_cache.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_cache.h ('k') | net/http/http_auth_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_cache.cc
===================================================================
--- net/http/http_auth_cache.cc (revision 53997)
+++ net/http/http_auth_cache.cc (working copy)
@@ -48,14 +48,14 @@
// Functor used by remove_if.
struct IsEnclosedBy {
- IsEnclosedBy(const std::string& path) : path(path) { }
+ explicit IsEnclosedBy(const std::string& path) : path(path) { }
bool operator() (const std::string& x) {
return IsEnclosingPath(path, x);
}
const std::string& path;
};
-} // namespace
+} // namespace
namespace net {
@@ -71,7 +71,7 @@
it->scheme() == scheme)
return &(*it);
}
- return NULL; // No realm entry found.
+ return NULL; // No realm entry found.
}
// Performance: O(n*m), where n is the number of realm entries, m is the number
@@ -93,15 +93,15 @@
if (it->origin() == origin && it->HasEnclosingPath(parent_dir))
return &(*it);
}
- return NULL; // No entry found.
+ return NULL; // No entry found.
}
HttpAuthCache::Entry* HttpAuthCache::Add(const GURL& origin,
const std::string& realm,
const std::string& scheme,
const std::string& auth_challenge,
- const std::wstring& username,
- const std::wstring& password,
+ const string16& username,
+ const string16& password,
const std::string& path) {
CheckOriginIsValid(origin);
CheckPathIsValid(path);
@@ -165,8 +165,8 @@
bool HttpAuthCache::Remove(const GURL& origin,
const std::string& realm,
const std::string& scheme,
- const std::wstring& username,
- const std::wstring& password) {
+ const string16& username,
+ const string16& password) {
for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
if (it->origin() == origin && it->realm() == realm &&
it->scheme() == scheme) {
@@ -180,4 +180,4 @@
return false;
}
-} // namespace net
+} // namespace net
« no previous file with comments | « net/http/http_auth_cache.h ('k') | net/http/http_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698