Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: chrome/browser/password_manager/password_form_manager.h

Issue 133893004: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaning the code Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // Checks if the form is a valid password form. Forms which lack either 87 // Checks if the form is a valid password form. Forms which lack either
88 // login or password field are not considered valid. 88 // login or password field are not considered valid.
89 bool HasValidPasswordForm(); 89 bool HasValidPasswordForm();
90 90
91 // These functions are used to determine if this form has had it's password 91 // These functions are used to determine if this form has had it's password
92 // auto generated by the browser. 92 // auto generated by the browser.
93 bool HasGeneratedPassword(); 93 bool HasGeneratedPassword();
94 void SetHasGeneratedPassword(); 94 void SetHasGeneratedPassword();
95 95
96 void RemoveAndUpdate(const string16& to_remove_username);
97 void Update(const string16& username_to_remove);
98
96 // Determines if we need to autofill given the results of the query. 99 // Determines if we need to autofill given the results of the query.
97 void OnRequestDone(const std::vector<autofill::PasswordForm*>& result); 100 void OnRequestDone(const std::vector<autofill::PasswordForm*>& result);
vabr (Chromium) 2014/03/07 23:43:36 nit: please return the blank line below
riadh.chtara 2014/03/14 17:16:08 Done.
98
99 // PasswordStoreConsumer implementation. 101 // PasswordStoreConsumer implementation.
100 virtual void OnPasswordStoreRequestDone( 102 virtual void OnPasswordStoreRequestDone(
101 CancelableRequestProvider::Handle handle, 103 CancelableRequestProvider::Handle handle,
102 const std::vector<autofill::PasswordForm*>& result) OVERRIDE; 104 const std::vector<autofill::PasswordForm*>& result) OVERRIDE;
103 virtual void OnGetPasswordStoreResults( 105 virtual void OnGetPasswordStoreResults(
104 const std::vector<autofill::PasswordForm*>& results) OVERRIDE; 106 const std::vector<autofill::PasswordForm*>& results) OVERRIDE;
105 107
106 // A user opted to 'never remember' passwords for this form. 108 // A user opted to 'never remember' passwords for this form.
107 // Blacklist it so that from now on when it is seen we ignore it. 109 // Blacklist it so that from now on when it is seen we ignore it.
108 // TODO: Make this private once we switch to the new UI. 110 // TODO: Make this private once we switch to the new UI.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // still unknown. 263 // still unknown.
262 autofill::PasswordForm pending_credentials_; 264 autofill::PasswordForm pending_credentials_;
263 265
264 // Whether pending_credentials_ stores a new login or is an update 266 // Whether pending_credentials_ stores a new login or is an update
265 // to an existing one. 267 // to an existing one.
266 bool is_new_login_; 268 bool is_new_login_;
267 269
268 // Whether this form has an auto generated password. 270 // Whether this form has an auto generated password.
269 bool has_generated_password_; 271 bool has_generated_password_;
270 272
273 bool remover_;
vabr (Chromium) 2014/03/07 23:43:36 What about getting rid of |remover_|, and using us
riadh.chtara 2014/03/14 17:16:08 Done.
274 bool only_update_;
275 string16 username_to_remove_;
276
271 // Set if the user has selected one of the other possible usernames in 277 // Set if the user has selected one of the other possible usernames in
272 // |pending_credentials_|. 278 // |pending_credentials_|.
273 string16 selected_username_; 279 string16 selected_username_;
274 280
275 // PasswordManager owning this. 281 // PasswordManager owning this.
276 const PasswordManager* const password_manager_; 282 const PasswordManager* const password_manager_;
277 283
278 // Convenience pointer to entry in best_matches_ that is marked 284 // Convenience pointer to entry in best_matches_ that is marked
279 // as preferred. This is only allowed to be null if there are no best matches 285 // as preferred. This is only allowed to be null if there are no best matches
280 // at all, since there will always be one preferred login when there are 286 // at all, since there will always be one preferred login when there are
(...skipping 24 matching lines...) Expand all
305 // These three fields record the "ActionsTaken" by the browser and 311 // These three fields record the "ActionsTaken" by the browser and
306 // the user with this form, and the result. They are combined and 312 // the user with this form, and the result. They are combined and
307 // recorded in UMA when the manager is destroyed. 313 // recorded in UMA when the manager is destroyed.
308 ManagerAction manager_action_; 314 ManagerAction manager_action_;
309 UserAction user_action_; 315 UserAction user_action_;
310 SubmitResult submit_result_; 316 SubmitResult submit_result_;
311 317
312 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); 318 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager);
313 }; 319 };
314 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_ 320 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_FORM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698