OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/lock.h" | 12 #include "base/lock.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "chrome/browser/password_manager/password_manager.h" | 14 #include "chrome/browser/password_manager/password_manager.h" |
15 #include "chrome/common/notification_observer.h" | 15 #include "chrome/common/notification_observer.h" |
16 #include "chrome/common/notification_registrar.h" | 16 #include "chrome/common/notification_registrar.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 class AuthChallengeInfo; | 19 class AuthChallengeInfo; |
20 } | 20 } |
21 | 21 |
22 class ConstrainedWindow; | 22 class ConstrainedWindow; |
23 class GURL; | 23 class GURL; |
24 class TabContents; | |
25 class URLRequest; | 24 class URLRequest; |
26 | 25 |
27 // This is the base implementation for the OS-specific classes that route | 26 // This is the base implementation for the OS-specific classes that route |
28 // authentication info to the URLRequest that needs it. These functions must | 27 // authentication info to the URLRequest that needs it. These functions must |
29 // be implemented in a thread safe manner. | 28 // be implemented in a thread safe manner. |
30 class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>, | 29 class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>, |
31 public LoginModelObserver, | 30 public LoginModelObserver, |
32 public NotificationObserver { | 31 public NotificationObserver { |
33 public: | 32 public: |
34 LoginHandler(net::AuthChallengeInfo* auth_info, URLRequest* request); | 33 LoginHandler(net::AuthChallengeInfo* auth_info, URLRequest* request); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 204 |
206 // Helper to remove the ref from an URLRequest to the LoginHandler. | 205 // Helper to remove the ref from an URLRequest to the LoginHandler. |
207 // Should only be called from the IO thread, since it accesses an URLRequest. | 206 // Should only be called from the IO thread, since it accesses an URLRequest. |
208 void ResetLoginHandlerForRequest(URLRequest* request); | 207 void ResetLoginHandlerForRequest(URLRequest* request); |
209 | 208 |
210 // Get the signon_realm under which the identity should be saved. | 209 // Get the signon_realm under which the identity should be saved. |
211 std::string GetSignonRealm(const GURL& url, | 210 std::string GetSignonRealm(const GURL& url, |
212 const net::AuthChallengeInfo& auth_info); | 211 const net::AuthChallengeInfo& auth_info); |
213 | 212 |
214 #endif // CHROME_BROWSER_LOGIN_PROMPT_H_ | 213 #endif // CHROME_BROWSER_LOGIN_PROMPT_H_ |
OLD | NEW |