| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_LOGIN_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_LOGIN_PROMPT_H_ |
| 6 #define CHROME_BROWSER_LOGIN_PROMPT_H_ | 6 #define CHROME_BROWSER_LOGIN_PROMPT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual void SetAuth(const std::wstring& username, | 57 virtual void SetAuth(const std::wstring& username, |
| 58 const std::wstring& password) = 0; | 58 const std::wstring& password) = 0; |
| 59 | 59 |
| 60 // Display the error page without asking for credentials again. | 60 // Display the error page without asking for credentials again. |
| 61 // This function can be called from either thread. | 61 // This function can be called from either thread. |
| 62 virtual void CancelAuth() = 0; | 62 virtual void CancelAuth() = 0; |
| 63 | 63 |
| 64 // Notify the handler that the request was cancelled. | 64 // Notify the handler that the request was cancelled. |
| 65 // This function can only be called from the IO thread. | 65 // This function can only be called from the IO thread. |
| 66 virtual void OnRequestCancelled() = 0; | 66 virtual void OnRequestCancelled() = 0; |
| 67 | |
| 68 protected: | |
| 69 ~LoginHandler() {} | |
| 70 }; | 67 }; |
| 71 | 68 |
| 72 // Details to provide the NotificationObserver. Used by the automation proxy | 69 // Details to provide the NotificationObserver. Used by the automation proxy |
| 73 // for testing. | 70 // for testing. |
| 74 class LoginNotificationDetails { | 71 class LoginNotificationDetails { |
| 75 public: | 72 public: |
| 76 LoginNotificationDetails(LoginHandler* handler) : handler_(handler) {} | 73 LoginNotificationDetails(LoginHandler* handler) : handler_(handler) {} |
| 77 LoginHandler* handler() const { return handler_; } | 74 LoginHandler* handler() const { return handler_; } |
| 78 | 75 |
| 79 private: | 76 private: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 99 | 96 |
| 100 // Helper to remove the ref from an URLRequest to the LoginHandler. | 97 // Helper to remove the ref from an URLRequest to the LoginHandler. |
| 101 // Should only be called from the IO thread, since it accesses an URLRequest. | 98 // Should only be called from the IO thread, since it accesses an URLRequest. |
| 102 void ResetLoginHandlerForRequest(URLRequest* request); | 99 void ResetLoginHandlerForRequest(URLRequest* request); |
| 103 | 100 |
| 104 // Get the signon_realm under which the identity should be saved. | 101 // Get the signon_realm under which the identity should be saved. |
| 105 std::string GetSignonRealm(const GURL& url, | 102 std::string GetSignonRealm(const GURL& url, |
| 106 const net::AuthChallengeInfo& auth_info); | 103 const net::AuthChallengeInfo& auth_info); |
| 107 | 104 |
| 108 #endif // CHROME_BROWSER_LOGIN_PROMPT_H_ | 105 #endif // CHROME_BROWSER_LOGIN_PROMPT_H_ |
| OLD | NEW |