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" | |
10 #include "base/strings/string_tokenizer.h" | 9 #include "base/strings/string_tokenizer.h" |
11 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
12 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
13 #include "net/http/http_auth_challenge_tokenizer.h" | 12 #include "net/http/http_auth_challenge_tokenizer.h" |
14 #include "net/http/http_auth_handler.h" | 13 #include "net/http/http_auth_handler.h" |
15 #include "net/http/http_auth_handler_factory.h" | 14 #include "net/http/http_auth_handler_factory.h" |
16 #include "net/http/http_auth_scheme.h" | 15 #include "net/http/http_auth_scheme.h" |
17 #include "net/http/http_request_headers.h" | 16 #include "net/http/http_request_headers.h" |
18 #include "net/http/http_response_headers.h" | 17 #include "net/http/http_response_headers.h" |
19 #include "net/http/http_util.h" | 18 #include "net/http/http_util.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 static_assert(arraysize(kSchemeNames) == AUTH_SCHEME_MAX, | 136 static_assert(arraysize(kSchemeNames) == AUTH_SCHEME_MAX, |
138 "http auth scheme names incorrect size"); | 137 "http auth scheme names incorrect size"); |
139 if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) { | 138 if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) { |
140 NOTREACHED(); | 139 NOTREACHED(); |
141 return "invalid_scheme"; | 140 return "invalid_scheme"; |
142 } | 141 } |
143 return kSchemeNames[scheme]; | 142 return kSchemeNames[scheme]; |
144 } | 143 } |
145 | 144 |
146 } // namespace net | 145 } // namespace net |
OLD | NEW |