| Index: net/http/http_auth_controller.h
|
| diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h
|
| index 9bc8d59d5ee039b8725680be0eb843d0ad00194d..8499809b104cce4498abd5e429fe08ee375de2c8 100644
|
| --- a/net/http/http_auth_controller.h
|
| +++ b/net/http/http_auth_controller.h
|
| @@ -25,13 +25,15 @@ class HttpNetworkSession;
|
| class HttpRequestHeaders;
|
| struct HttpRequestInfo;
|
|
|
| -class HttpAuthController : public base::RefCounted<HttpAuthController> {
|
| +class HttpAuthController {
|
| public:
|
| // The arguments are self explanatory except possibly for |auth_url|, which
|
| // should be both the auth target and auth path in a single url argument.
|
| HttpAuthController(HttpAuth::Target target, const GURL& auth_url,
|
| scoped_refptr<HttpNetworkSession> session);
|
|
|
| + ~HttpAuthController();
|
| +
|
| // Generate an authentication token for |target| if necessary. The return
|
| // value is a net error code. |OK| will be returned both in the case that
|
| // a token is correctly generated synchronously, as well as when no tokens
|
| @@ -53,9 +55,12 @@ class HttpAuthController : public base::RefCounted<HttpAuthController> {
|
| bool establishing_tunnel,
|
| const BoundNetLog& net_log);
|
|
|
| - // Store the supplied credentials and prepare to restart the auth.
|
| - virtual void ResetAuth(const std::wstring& username,
|
| - const std::wstring& password);
|
| + // Store the supplied credentials.
|
| + virtual void SetCredentials(const std::wstring& username,
|
| + const std::wstring& password);
|
| +
|
| + // Prepare to restart the auth.
|
| + virtual void PrepareForAuthRestart();
|
|
|
| virtual bool HaveAuthHandler() const {
|
| return handler_.get() != NULL;
|
| @@ -65,6 +70,10 @@ class HttpAuthController : public base::RefCounted<HttpAuthController> {
|
| return handler_.get() && !identity_.invalid;
|
| }
|
|
|
| + virtual HttpAuth::Identity AuthIdentity() {
|
| + return identity_;
|
| + }
|
| +
|
| virtual scoped_refptr<AuthChallengeInfo> auth_info() {
|
| return auth_info_;
|
| }
|
| @@ -72,10 +81,6 @@ class HttpAuthController : public base::RefCounted<HttpAuthController> {
|
| virtual bool IsAuthSchemeDisabled(const std::string& scheme) const;
|
| virtual void DisableAuthScheme(const std::string& scheme);
|
|
|
| - protected: // So that we can mock this object.
|
| - friend class base::RefCounted<HttpAuthController>;
|
| - virtual ~HttpAuthController();
|
| -
|
| private:
|
| // Searches the auth cache for an entry that encompasses the request's path.
|
| // If such an entry is found, updates |identity_| and |handler_| with the
|
| @@ -142,6 +147,8 @@ class HttpAuthController : public base::RefCounted<HttpAuthController> {
|
|
|
| CompletionCallbackImpl<HttpAuthController> io_callback_;
|
| CompletionCallback* user_callback_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(HttpAuthController);
|
| };
|
|
|
| } // namespace net
|
|
|