Index: chrome/browser/password_manager/password_form_manager.h |
diff --git a/chrome/browser/password_manager/password_form_manager.h b/chrome/browser/password_manager/password_form_manager.h |
index 1735032bd4239c43d4295cb822429f3aab6c28cd..672691855723ffd09be8a5081ca949f7311f9c33 100644 |
--- a/chrome/browser/password_manager/password_form_manager.h |
+++ b/chrome/browser/password_manager/password_form_manager.h |
@@ -49,6 +49,12 @@ class PasswordFormManager : public PasswordStoreConsumer { |
IGNORE_OTHER_POSSIBLE_USERNAMES |
}; |
+ enum PasswordAction { |
+ DO_NOTHING, |
+ SAVE, |
+ BLACKLIST |
+ }; |
+ |
// Compare basic data of observed_form_ with argument. Only check the action |
// URL when action match is required. |
bool DoesManage(const autofill::PasswordForm& form, |
@@ -71,18 +77,17 @@ class PasswordFormManager : public PasswordStoreConsumer { |
// the same thread! |
bool HasCompletedMatching(); |
- // Sets current password to be saved when ApplyEdits() is called. Will |
- // override a previous call to BlacklistPassword(). |
- void SavePassword(); |
- |
- // Sets current password to be blacklisted when ApplyEdits() is called. Will |
- // override a previous call to SavePassword(). |
- void BlacklistPassword(); |
- |
// Persist changes from the latest call to either SavePassword() or |
// BlacklistPassword(). |
void ApplyChange(); |
+ // Sets the state that remembers whether login credentials should be saved |
+ // or blacklisted when the next navigation occurs or the tab is closed. In |
+ // either scenario ApplyChange() is called. |
Peter Kasting
2013/09/10 23:04:41
This comment is very confusing (poor wording).
Co
npentrel
2013/09/11 09:10:42
Done.
|
+ void SetPasswordAction(PasswordAction password_action) { |
+ password_action_ = password_action; |
Peter Kasting
2013/09/10 23:04:41
Simple inlined setters should be named set_passwor
npentrel
2013/09/11 09:10:42
Done.
|
+ } |
+ |
// Determines if the user opted to 'never remember' passwords for this form. |
bool IsBlacklisted(); |
@@ -117,7 +122,6 @@ class PasswordFormManager : public PasswordStoreConsumer { |
// A user opted to 'never remember' passwords for this form. |
// Blacklist it so that from now on when it is seen we ignore it. |
- |
// TODO: Make this private once we switch to the new UI. |
void PermanentlyBlacklist(); |
@@ -134,7 +138,6 @@ class PasswordFormManager : public PasswordStoreConsumer { |
// Handles save-as-new or update of the form managed by this manager. |
// Note the basic data of updated_credentials must match that of |
// observed_form_ (e.g DoesManage(pending_credentials_) == true). |
- |
// TODO: Make this private once we switch to the new UI. |
void Save(); |
@@ -307,8 +310,7 @@ class PasswordFormManager : public PasswordStoreConsumer { |
ManagerAction manager_action_; |
UserAction user_action_; |
SubmitResult submit_result_; |
- bool should_save_password_; |
- bool should_blacklist_password_; |
+ PasswordAction password_action_; |
DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); |
}; |