| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Sets |identity_| to the next identity that the transaction should try. It | 104 // Sets |identity_| to the next identity that the transaction should try. It |
| 105 // chooses candidates by searching the auth cache and the URL for a | 105 // chooses candidates by searching the auth cache and the URL for a |
| 106 // username:password. Returns true if an identity was found. | 106 // username:password. Returns true if an identity was found. |
| 107 bool SelectNextAuthIdentityToTry(); | 107 bool SelectNextAuthIdentityToTry(); |
| 108 | 108 |
| 109 // Populates auth_info_ with the challenge information, so that | 109 // Populates auth_info_ with the challenge information, so that |
| 110 // URLRequestHttpJob can prompt for credentials. | 110 // URLRequestHttpJob can prompt for credentials. |
| 111 void PopulateAuthChallenge(); | 111 void PopulateAuthChallenge(); |
| 112 | 112 |
| 113 // If |result| indicates a permanent failure, disables the current | 113 // Handle the result of calling GenerateAuthToken on an HttpAuthHandler. The |
| 114 // auth scheme for this controller and returns true. Returns false | 114 // return value of this function should be used as the return value of the |
| 115 // otherwise. | 115 // GenerateAuthToken operation. |
| 116 bool DisableOnAuthHandlerResult(int result); | 116 int HandleGenerateTokenResult(int result); |
| 117 | 117 |
| 118 void OnIOComplete(int result); | 118 void OnIOComplete(int result); |
| 119 | 119 |
| 120 // Indicates if this handler is for Proxy auth or Server auth. | 120 // Indicates if this handler is for Proxy auth or Server auth. |
| 121 HttpAuth::Target target_; | 121 HttpAuth::Target target_; |
| 122 | 122 |
| 123 // Holds the {scheme, host, path, port} for the authentication target. | 123 // Holds the {scheme, host, path, port} for the authentication target. |
| 124 const GURL auth_url_; | 124 const GURL auth_url_; |
| 125 | 125 |
| 126 // Holds the {scheme, host, port} for the authentication target. | 126 // Holds the {scheme, host, port} for the authentication target. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 163 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
| 164 | 164 |
| 165 std::set<HttpAuth::Scheme> disabled_schemes_; | 165 std::set<HttpAuth::Scheme> disabled_schemes_; |
| 166 | 166 |
| 167 CompletionCallback callback_; | 167 CompletionCallback callback_; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace net | 170 } // namespace net |
| 171 | 171 |
| 172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
| OLD | NEW |