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

Unified Diff: net/http/http_auth_handler_digest.cc

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « net/http/http_auth_handler_basic.cc ('k') | net/http/http_auth_handler_mock.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 7dee081ddbe9ed7de7ea60ac6a6fa3a64419f2f9..2f88d6dd48b4c3b03914e42d73648a456e968b8c 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -113,7 +113,7 @@ HttpAuth::AuthorizationResult HttpAuthHandlerDigest::HandleAnotherChallenge(
// to differentiate between stale and rejected responses.
// Note that the state of the current handler is not mutated - this way if
// there is a rejection the realm hasn't changed.
- if (!LowerCaseEqualsASCII(challenge->scheme(), "digest"))
+ if (!base::LowerCaseEqualsASCII(challenge->scheme(), "digest"))
return HttpAuth::AUTHORIZATION_RESULT_INVALID;
HttpUtil::NameValuePairsIterator parameters = challenge->param_pairs();
@@ -122,10 +122,10 @@ HttpAuth::AuthorizationResult HttpAuthHandlerDigest::HandleAnotherChallenge(
// for the new challenge.
std::string original_realm;
while (parameters.GetNext()) {
- if (LowerCaseEqualsASCII(parameters.name(), "stale")) {
- if (LowerCaseEqualsASCII(parameters.value(), "true"))
+ if (base::LowerCaseEqualsASCII(parameters.name(), "stale")) {
+ if (base::LowerCaseEqualsASCII(parameters.value(), "true"))
return HttpAuth::AUTHORIZATION_RESULT_STALE;
- } else if (LowerCaseEqualsASCII(parameters.name(), "realm")) {
+ } else if (base::LowerCaseEqualsASCII(parameters.name(), "realm")) {
original_realm = parameters.value();
}
}
@@ -199,7 +199,7 @@ bool HttpAuthHandlerDigest::ParseChallenge(
realm_ = original_realm_ = nonce_ = domain_ = opaque_ = std::string();
// FAIL -- Couldn't match auth-scheme.
- if (!LowerCaseEqualsASCII(challenge->scheme(), "digest"))
+ if (!base::LowerCaseEqualsASCII(challenge->scheme(), "digest"))
return false;
HttpUtil::NameValuePairsIterator parameters = challenge->param_pairs();
@@ -225,38 +225,38 @@ bool HttpAuthHandlerDigest::ParseChallenge(
bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
const std::string& value) {
- if (LowerCaseEqualsASCII(name, "realm")) {
+ if (base::LowerCaseEqualsASCII(name, "realm")) {
std::string realm;
if (!net::ConvertToUtf8AndNormalize(value, kCharsetLatin1, &realm))
return false;
realm_ = realm;
original_realm_ = value;
- } else if (LowerCaseEqualsASCII(name, "nonce")) {
+ } else if (base::LowerCaseEqualsASCII(name, "nonce")) {
nonce_ = value;
- } else if (LowerCaseEqualsASCII(name, "domain")) {
+ } else if (base::LowerCaseEqualsASCII(name, "domain")) {
domain_ = value;
- } else if (LowerCaseEqualsASCII(name, "opaque")) {
+ } else if (base::LowerCaseEqualsASCII(name, "opaque")) {
opaque_ = value;
- } else if (LowerCaseEqualsASCII(name, "stale")) {
+ } else if (base::LowerCaseEqualsASCII(name, "stale")) {
// Parse the stale boolean.
- stale_ = LowerCaseEqualsASCII(value, "true");
- } else if (LowerCaseEqualsASCII(name, "algorithm")) {
+ stale_ = base::LowerCaseEqualsASCII(value, "true");
+ } else if (base::LowerCaseEqualsASCII(name, "algorithm")) {
// Parse the algorithm.
- if (LowerCaseEqualsASCII(value, "md5")) {
+ if (base::LowerCaseEqualsASCII(value, "md5")) {
algorithm_ = ALGORITHM_MD5;
- } else if (LowerCaseEqualsASCII(value, "md5-sess")) {
+ } else if (base::LowerCaseEqualsASCII(value, "md5-sess")) {
algorithm_ = ALGORITHM_MD5_SESS;
} else {
DVLOG(1) << "Unknown value of algorithm";
return false; // FAIL -- unsupported value of algorithm.
}
- } else if (LowerCaseEqualsASCII(name, "qop")) {
+ } else if (base::LowerCaseEqualsASCII(name, "qop")) {
// Parse the comma separated list of qops.
// auth is the only supported qop, and all other values are ignored.
HttpUtil::ValuesIterator qop_values(value.begin(), value.end(), ',');
qop_ = QOP_UNSPECIFIED;
while (qop_values.GetNext()) {
- if (LowerCaseEqualsASCII(qop_values.value(), "auth")) {
+ if (base::LowerCaseEqualsASCII(qop_values.value(), "auth")) {
qop_ = QOP_AUTH;
break;
}
« no previous file with comments | « net/http/http_auth_handler_basic.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698