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

Unified Diff: net/http/http_auth_handler_digest.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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 0fbd0d33084c0e8a11499acc38905607eec51b0b..a5f96b1e25ffa0feac0aa5706cb0288c81894312 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 (!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