| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "chrome/browser/password_manager/password_manager.h" | 13 #include "chrome/browser/password_manager/password_manager.h" |
| 14 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" | 14 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 class AuthChallengeInfo; | 19 class AuthChallengeInfo; |
| 20 class HttpNetworkSession; |
| 20 class URLRequest; | 21 class URLRequest; |
| 21 } // namespace net | 22 } // namespace net |
| 22 | 23 |
| 23 class ConstrainedWindow; | 24 class ConstrainedWindow; |
| 24 class GURL; | 25 class GURL; |
| 25 class RenderViewHostDelegate; | 26 class RenderViewHostDelegate; |
| 26 | 27 |
| 27 // This is the base implementation for the OS-specific classes that route | 28 // This is the base implementation for the OS-specific classes that route |
| 28 // authentication info to the net::URLRequest that needs it. These functions | 29 // authentication info to the net::URLRequest that needs it. These functions |
| 29 // must be implemented in a thread safe manner. | 30 // must be implemented in a thread safe manner. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // This should only be accessed on the UI loop. | 127 // This should only be accessed on the UI loop. |
| 127 ConstrainedWindow* dialog_; | 128 ConstrainedWindow* dialog_; |
| 128 | 129 |
| 129 // Who/where/what asked for the authentication. | 130 // Who/where/what asked for the authentication. |
| 130 scoped_refptr<net::AuthChallengeInfo> auth_info_; | 131 scoped_refptr<net::AuthChallengeInfo> auth_info_; |
| 131 | 132 |
| 132 // The request that wants login data. | 133 // The request that wants login data. |
| 133 // This should only be accessed on the IO loop. | 134 // This should only be accessed on the IO loop. |
| 134 net::URLRequest* request_; | 135 net::URLRequest* request_; |
| 135 | 136 |
| 137 // The HttpNetworkSession |request_| is associated with. |
| 138 const net::HttpNetworkSession* http_network_session_; |
| 139 |
| 136 // The PasswordForm sent to the PasswordManager. This is so we can refer to it | 140 // The PasswordForm sent to the PasswordManager. This is so we can refer to it |
| 137 // when later notifying the password manager if the credentials were accepted | 141 // when later notifying the password manager if the credentials were accepted |
| 138 // or rejected. | 142 // or rejected. |
| 139 // This should only be accessed on the UI loop. | 143 // This should only be accessed on the UI loop. |
| 140 webkit_glue::PasswordForm password_form_; | 144 webkit_glue::PasswordForm password_form_; |
| 141 | 145 |
| 142 // Points to the password manager owned by the TabContents requesting auth. | 146 // Points to the password manager owned by the TabContents requesting auth. |
| 143 // Can be null if the TabContents is not a TabContents. | 147 // Can be null if the TabContents is not a TabContents. |
| 144 // This should only be accessed on the UI loop. | 148 // This should only be accessed on the UI loop. |
| 145 PasswordManager* password_manager_; | 149 PasswordManager* password_manager_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Helper to remove the ref from an net::URLRequest to the LoginHandler. | 215 // 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 | 216 // Should only be called from the IO thread, since it accesses an |
| 213 // net::URLRequest. | 217 // net::URLRequest. |
| 214 void ResetLoginHandlerForRequest(net::URLRequest* request); | 218 void ResetLoginHandlerForRequest(net::URLRequest* request); |
| 215 | 219 |
| 216 // Get the signon_realm under which the identity should be saved. | 220 // Get the signon_realm under which the identity should be saved. |
| 217 std::string GetSignonRealm(const GURL& url, | 221 std::string GetSignonRealm(const GURL& url, |
| 218 const net::AuthChallengeInfo& auth_info); | 222 const net::AuthChallengeInfo& auth_info); |
| 219 | 223 |
| 220 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 224 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
| OLD | NEW |