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 CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void SetAuth(const string16& username, const string16& password); | 62 void SetAuth(const string16& username, const string16& password); |
63 | 63 |
64 // Display the error page without asking for credentials again. | 64 // Display the error page without asking for credentials again. |
65 // This function can be called from either thread. | 65 // This function can be called from either thread. |
66 void CancelAuth(); | 66 void CancelAuth(); |
67 | 67 |
68 // Implements the NotificationObserver interface. | 68 // Implements the NotificationObserver interface. |
69 // Listens for AUTH_SUPPLIED and AUTH_CANCELLED notifications from other | 69 // Listens for AUTH_SUPPLIED and AUTH_CANCELLED notifications from other |
70 // LoginHandlers so that this LoginHandler has the chance to dismiss itself | 70 // LoginHandlers so that this LoginHandler has the chance to dismiss itself |
71 // if it was waiting for the same authentication. | 71 // if it was waiting for the same authentication. |
72 virtual void Observe(NotificationType type, | 72 virtual void Observe(int type, |
73 const NotificationSource& source, | 73 const NotificationSource& source, |
74 const NotificationDetails& details); | 74 const NotificationDetails& details); |
75 | 75 |
76 // Who/where/what asked for the authentication. | 76 // Who/where/what asked for the authentication. |
77 const net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); } | 77 const net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); } |
78 | 78 |
79 // Returns whether authentication had been handled (SetAuth or CancelAuth). | 79 // Returns whether authentication had been handled (SetAuth or CancelAuth). |
80 bool WasAuthHandled() const; | 80 bool WasAuthHandled() const; |
81 | 81 |
82 protected: | 82 protected: |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Helper to remove the ref from an net::URLRequest to the LoginHandler. | 211 // Helper to remove the ref from an net::URLRequest to the LoginHandler. |
212 // Should only be called from the IO thread, since it accesses an | 212 // Should only be called from the IO thread, since it accesses an |
213 // net::URLRequest. | 213 // net::URLRequest. |
214 void ResetLoginHandlerForRequest(net::URLRequest* request); | 214 void ResetLoginHandlerForRequest(net::URLRequest* request); |
215 | 215 |
216 // Get the signon_realm under which the identity should be saved. | 216 // Get the signon_realm under which the identity should be saved. |
217 std::string GetSignonRealm(const GURL& url, | 217 std::string GetSignonRealm(const GURL& url, |
218 const net::AuthChallengeInfo& auth_info); | 218 const net::AuthChallengeInfo& auth_info); |
219 | 219 |
220 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 220 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
OLD | NEW |