| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 PasswordFormManager(Profile* profile, | 35 PasswordFormManager(Profile* profile, |
| 36 PasswordManager* password_manager, | 36 PasswordManager* password_manager, |
| 37 content::WebContents* web_contents, | 37 content::WebContents* web_contents, |
| 38 const webkit::forms::PasswordForm& observed_form, | 38 const webkit::forms::PasswordForm& observed_form, |
| 39 bool ssl_valid); | 39 bool ssl_valid); |
| 40 virtual ~PasswordFormManager(); | 40 virtual ~PasswordFormManager(); |
| 41 | 41 |
| 42 // Compare basic data of observed_form_ with argument. | 42 // Compare basic data of observed_form_ with argument. |
| 43 bool DoesManage(const webkit::forms::PasswordForm& form) const; | 43 bool DoesManage(const webkit::forms::PasswordForm& form) const; |
| 44 | 44 |
| 45 // Compare basic data of observed_form_ with argument. Only check the action |
| 46 // URL when require_action_match is set to true. |
| 47 bool DoesManage(const webkit::forms::PasswordForm& form, |
| 48 bool require_action_match) const; |
| 49 |
| 45 // Retrieves potential matching logins from the database. | 50 // Retrieves potential matching logins from the database. |
| 46 void FetchMatchingLoginsFromPasswordStore(); | 51 void FetchMatchingLoginsFromPasswordStore(); |
| 47 | 52 |
| 48 // Simple state-check to verify whether this object as received a callback | 53 // Simple state-check to verify whether this object as received a callback |
| 49 // from the PasswordStore and completed its matching phase. Note that the | 54 // from the PasswordStore and completed its matching phase. Note that the |
| 50 // callback in question occurs on the same (and only) main thread from which | 55 // callback in question occurs on the same (and only) main thread from which |
| 51 // instances of this class are ever used, but it is required since it is | 56 // instances of this class are ever used, but it is required since it is |
| 52 // conceivable that a user (or ui test) could attempt to submit a login | 57 // conceivable that a user (or ui test) could attempt to submit a login |
| 53 // prompt before the callback has occured, which would InvokeLater a call to | 58 // prompt before the callback has occured, which would InvokeLater a call to |
| 54 // PasswordManager::ProvisionallySave, which would interact with this object | 59 // PasswordManager::ProvisionallySave, which would interact with this object |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // These three fields record the "ActionsTaken" by the browser and | 259 // These three fields record the "ActionsTaken" by the browser and |
| 255 // the user with this form, and the result. They are combined and | 260 // the user with this form, and the result. They are combined and |
| 256 // recorded in UMA when the manager is destroyed. | 261 // recorded in UMA when the manager is destroyed. |
| 257 ManagerAction manager_action_; | 262 ManagerAction manager_action_; |
| 258 UserAction user_action_; | 263 UserAction user_action_; |
| 259 SubmitResult submit_result_; | 264 SubmitResult submit_result_; |
| 260 | 265 |
| 261 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); | 266 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); |
| 262 }; | 267 }; |
| 263 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ | 268 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ |
| OLD | NEW |