| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 bool HaveAuthHandler() const; | 66 bool HaveAuthHandler() const; |
| 67 | 67 |
| 68 bool HaveAuth() const; | 68 bool HaveAuth() const; |
| 69 | 69 |
| 70 scoped_refptr<AuthChallengeInfo> auth_info(); | 70 scoped_refptr<AuthChallengeInfo> auth_info(); |
| 71 | 71 |
| 72 bool IsAuthSchemeDisabled(HttpAuth::Scheme scheme) const; | 72 bool IsAuthSchemeDisabled(HttpAuth::Scheme scheme) const; |
| 73 void DisableAuthScheme(HttpAuth::Scheme scheme); | 73 void DisableAuthScheme(HttpAuth::Scheme scheme); |
| 74 void DisableEmbeddedIdentity(); | 74 void DisableEmbeddedIdentity(); |
| 75 | 75 |
| 76 // Called when the connection has been closed, so the current handler (which |
| 77 // contains state bound to the connection) should be dropped. If retrying on a |
| 78 // new connection, the next call to MaybeGenerateAuthToken will retry the |
| 79 // current auth scheme. |
| 80 void OnConnectionClosed(); |
| 81 |
| 76 private: | 82 private: |
| 77 // Actions for InvalidateCurrentHandler() | 83 // Actions for InvalidateCurrentHandler() |
| 78 enum InvalidateHandlerAction { | 84 enum InvalidateHandlerAction { |
| 79 INVALIDATE_HANDLER_AND_CACHED_CREDENTIALS, | 85 INVALIDATE_HANDLER_AND_CACHED_CREDENTIALS, |
| 80 INVALIDATE_HANDLER_AND_DISABLE_SCHEME, | 86 INVALIDATE_HANDLER_AND_DISABLE_SCHEME, |
| 81 INVALIDATE_HANDLER | 87 INVALIDATE_HANDLER |
| 82 }; | 88 }; |
| 83 | 89 |
| 84 // So that we can mock this object. | 90 // So that we can mock this object. |
| 85 friend class base::RefCounted<HttpAuthController>; | 91 friend class base::RefCounted<HttpAuthController>; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 168 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
| 163 | 169 |
| 164 std::set<HttpAuth::Scheme> disabled_schemes_; | 170 std::set<HttpAuth::Scheme> disabled_schemes_; |
| 165 | 171 |
| 166 CompletionCallback callback_; | 172 CompletionCallback callback_; |
| 167 }; | 173 }; |
| 168 | 174 |
| 169 } // namespace net | 175 } // namespace net |
| 170 | 176 |
| 171 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 177 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
| OLD | NEW |