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

Unified Diff: net/http/http_auth_handler.cc

Issue 10916272: Remove HttpAuth::Scheme enum in favor of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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.h ('k') | net/http/http_auth_handler_basic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler.cc
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index ab809faefae1189d9a1cf8a5c2ae1bf8f1897ed6..6f7484c9d56f95e55f0822bede4bbccfa991d94a 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -7,13 +7,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
+#include "base/string_util.h"
#include "net/base/net_errors.h"
namespace net {
HttpAuthHandler::HttpAuthHandler()
- : auth_scheme_(HttpAuth::AUTH_SCHEME_MAX),
- score_(-1),
+ : score_(-1),
target_(HttpAuth::AUTH_NONE),
properties_(-1) {
}
@@ -39,7 +39,8 @@ bool HttpAuthHandler::InitFromChallenge(
// realm may be empty.
DCHECK(!ok || score_ != -1);
DCHECK(!ok || properties_ != -1);
- DCHECK(!ok || auth_scheme_ != HttpAuth::AUTH_SCHEME_MAX);
+ DCHECK(!ok || (!auth_scheme_.empty() &&
+ StringToLowerASCII(auth_scheme_) == auth_scheme_));
return ok;
}
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_auth_handler_basic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698