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 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
17 #include "net/http/http_auth.h" | 17 #include "net/http/http_auth.h" |
18 #include "net/log/net_log.h" | 18 #include "net/log/net_log.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 #include "url/origin.h" |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 | 23 |
23 class AuthChallengeInfo; | 24 class AuthChallengeInfo; |
24 class AuthCredentials; | 25 class AuthCredentials; |
25 class HttpAuthHandler; | 26 class HttpAuthHandler; |
26 class HttpAuthHandlerFactory; | 27 class HttpAuthHandlerFactory; |
27 class HttpAuthCache; | 28 class HttpAuthCache; |
28 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
29 struct HttpRequestInfo; | 30 struct HttpRequestInfo; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 117 |
117 void OnIOComplete(int result); | 118 void OnIOComplete(int result); |
118 | 119 |
119 // Indicates if this handler is for Proxy auth or Server auth. | 120 // Indicates if this handler is for Proxy auth or Server auth. |
120 HttpAuth::Target target_; | 121 HttpAuth::Target target_; |
121 | 122 |
122 // Holds the {scheme, host, path, port} for the authentication target. | 123 // Holds the {scheme, host, path, port} for the authentication target. |
123 const GURL auth_url_; | 124 const GURL auth_url_; |
124 | 125 |
125 // Holds the {scheme, host, port} for the authentication target. | 126 // Holds the {scheme, host, port} for the authentication target. |
126 const GURL auth_origin_; | 127 const url::Origin auth_origin_; |
127 | 128 |
128 // The absolute path of the resource needing authentication. | 129 // The absolute path of the resource needing authentication. |
129 // For proxy authentication the path is empty. | 130 // For proxy authentication the path is empty. |
130 const std::string auth_path_; | 131 const std::string auth_path_; |
131 | 132 |
132 // |handler_| encapsulates the logic for the particular auth-scheme. | 133 // |handler_| encapsulates the logic for the particular auth-scheme. |
133 // This includes the challenge's parameters. If NULL, then there is no | 134 // This includes the challenge's parameters. If NULL, then there is no |
134 // associated auth handler. | 135 // associated auth handler. |
135 scoped_ptr<HttpAuthHandler> handler_; | 136 scoped_ptr<HttpAuthHandler> handler_; |
136 | 137 |
(...skipping 25 matching lines...) Expand all Loading... |
162 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 163 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
163 | 164 |
164 std::set<HttpAuth::Scheme> disabled_schemes_; | 165 std::set<HttpAuth::Scheme> disabled_schemes_; |
165 | 166 |
166 CompletionCallback callback_; | 167 CompletionCallback callback_; |
167 }; | 168 }; |
168 | 169 |
169 } // namespace net | 170 } // namespace net |
170 | 171 |
171 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
OLD | NEW |