| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 virtual scoped_refptr<AuthChallengeInfo> auth_info(); | 72 virtual scoped_refptr<AuthChallengeInfo> auth_info(); |
| 73 | 73 |
| 74 virtual bool IsAuthSchemeDisabled(HttpAuth::Scheme scheme) const; | 74 virtual bool IsAuthSchemeDisabled(HttpAuth::Scheme scheme) const; |
| 75 virtual void DisableAuthScheme(HttpAuth::Scheme scheme); | 75 virtual void DisableAuthScheme(HttpAuth::Scheme scheme); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 // Actions for InvalidateCurrentHandler() | 78 // Actions for InvalidateCurrentHandler() |
| 79 enum InvalidateHandlerAction { | 79 enum InvalidateHandlerAction { |
| 80 INVALIDATE_HANDLER_AND_CACHED_CREDENTIALS, | 80 INVALIDATE_HANDLER_AND_CACHED_CREDENTIALS, |
| 81 INVALIDATE_HANDLER_AND_DISABLE_SCHEME, |
| 81 INVALIDATE_HANDLER | 82 INVALIDATE_HANDLER |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 // So that we can mock this object. | 85 // So that we can mock this object. |
| 85 friend class base::RefCounted<HttpAuthController>; | 86 friend class base::RefCounted<HttpAuthController>; |
| 86 | 87 |
| 87 virtual ~HttpAuthController(); | 88 virtual ~HttpAuthController(); |
| 88 | 89 |
| 89 // Searches the auth cache for an entry that encompasses the request's path. | 90 // Searches the auth cache for an entry that encompasses the request's path. |
| 90 // If such an entry is found, updates |identity_| and |handler_| with the | 91 // If such an entry is found, updates |identity_| and |handler_| with the |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 164 |
| 164 std::set<HttpAuth::Scheme> disabled_schemes_; | 165 std::set<HttpAuth::Scheme> disabled_schemes_; |
| 165 | 166 |
| 166 CompletionCallbackImpl<HttpAuthController> io_callback_; | 167 CompletionCallbackImpl<HttpAuthController> io_callback_; |
| 167 CompletionCallback* user_callback_; | 168 CompletionCallback* user_callback_; |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 } // namespace net | 171 } // namespace net |
| 171 | 172 |
| 172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ | 173 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ |
| OLD | NEW |