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

Unified Diff: net/socket_stream/socket_stream.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/socket/ssl_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_proxy_client_socket_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream.cc
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index ce989828a94515cd307d16945d3fa44605901c41..735e2927abedd0174193d95bbb32929472ded8fc 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -765,8 +765,7 @@ int SocketStream::DoWriteTunnelHeaders() {
// Support basic authentication scheme only, because we don't have
// HttpRequestInfo.
// TODO(ukai): Add support other authentication scheme.
- if (auth_handler_.get() &&
- auth_handler_->auth_scheme() == HttpAuth::AUTH_SCHEME_BASIC) {
+ if (auth_handler_.get() && auth_handler_->auth_scheme() == "basic") {
HttpRequestInfo request_info;
std::string auth_token;
int rv = auth_handler_->GenerateAuthToken(
@@ -905,8 +904,7 @@ int SocketStream::DoReadTunnelHeadersComplete(int result) {
auth_info_ = new AuthChallengeInfo;
auth_info_->is_proxy = true;
auth_info_->challenger = proxy_info_.proxy_server().host_port_pair();
- auth_info_->scheme = HttpAuth::SchemeToString(
- auth_handler_->auth_scheme());
+ auth_info_->scheme = auth_handler_->auth_scheme();
auth_info_->realm = auth_handler_->realm();
// Wait until RestartWithAuth or Close is called.
MessageLoop::current()->PostTask(
@@ -1163,7 +1161,7 @@ int SocketStream::HandleAuthChallenge(const HttpResponseHeaders* headers) {
}
auth_identity_.invalid = true;
- std::set<HttpAuth::Scheme> disabled_schemes;
+ std::set<std::string> disabled_schemes;
HttpAuth::ChooseBestChallenge(http_auth_handler_factory_, headers,
HttpAuth::AUTH_PROXY,
auth_origin, disabled_schemes,
@@ -1176,7 +1174,7 @@ int SocketStream::HandleAuthChallenge(const HttpResponseHeaders* headers) {
// We only support basic authentication scheme now.
// TODO(ukai): Support other authentication scheme.
HttpAuthCache::Entry* entry = auth_cache_.Lookup(
- auth_origin, auth_handler_->realm(), HttpAuth::AUTH_SCHEME_BASIC);
+ auth_origin, auth_handler_->realm(), "basic");
if (entry) {
auth_identity_.source = HttpAuth::IDENT_SRC_REALM_LOOKUP;
auth_identity_.invalid = false;
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_proxy_client_socket_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698