| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_auth.h" | 5 #include "net/http/http_auth.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 12 #include "net/http/http_auth_handler_basic.h" | 12 #include "net/http/http_auth_handler.h" |
| 13 #include "net/http/http_auth_handler_digest.h" | 13 #include "net/http/http_auth_handler_factory.h" |
| 14 #include "net/http/http_auth_handler_negotiate.h" | |
| 15 #include "net/http/http_auth_handler_ntlm.h" | |
| 16 #include "net/http/http_request_headers.h" | 14 #include "net/http/http_request_headers.h" |
| 17 #include "net/http/http_response_headers.h" | 15 #include "net/http/http_response_headers.h" |
| 18 #include "net/http/http_util.h" | 16 #include "net/http/http_util.h" |
| 19 | 17 |
| 20 namespace net { | 18 namespace net { |
| 21 | 19 |
| 22 HttpAuth::Identity::Identity() : source(IDENT_SRC_NONE), invalid(true) {} | 20 HttpAuth::Identity::Identity() : source(IDENT_SRC_NONE), invalid(true) {} |
| 23 | 21 |
| 24 // static | 22 // static |
| 25 void HttpAuth::ChooseBestChallenge( | 23 void HttpAuth::ChooseBestChallenge( |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 COMPILE_ASSERT(arraysize(kSchemeNames) == AUTH_SCHEME_MAX, | 175 COMPILE_ASSERT(arraysize(kSchemeNames) == AUTH_SCHEME_MAX, |
| 178 http_auth_scheme_names_incorrect_size); | 176 http_auth_scheme_names_incorrect_size); |
| 179 if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) { | 177 if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) { |
| 180 NOTREACHED(); | 178 NOTREACHED(); |
| 181 return "invalid_scheme"; | 179 return "invalid_scheme"; |
| 182 } | 180 } |
| 183 return kSchemeNames[scheme]; | 181 return kSchemeNames[scheme]; |
| 184 } | 182 } |
| 185 | 183 |
| 186 } // namespace net | 184 } // namespace net |
| OLD | NEW |