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

Side by Side Diff: components/password_manager/core/browser/password_form_manager.h

Issue 870513002: [PasswordManager] Improve detection of ignorable change password forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated reviews. Created 5 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // PasswordManager::ProvisionallySave, which would interact with this object 79 // PasswordManager::ProvisionallySave, which would interact with this object
80 // before the db has had time to answer with matching password entries. 80 // before the db has had time to answer with matching password entries.
81 // This is intended to be a one-time check; if the return value is false the 81 // This is intended to be a one-time check; if the return value is false the
82 // expectation is caller will give up. This clearly won't work if you put it 82 // expectation is caller will give up. This clearly won't work if you put it
83 // in a loop and wait for matching to complete; you're (supposed to be) on 83 // in a loop and wait for matching to complete; you're (supposed to be) on
84 // the same thread! 84 // the same thread!
85 bool HasCompletedMatching() const; 85 bool HasCompletedMatching() const;
86 86
87 // Returns true if the observed form has both the current and new password 87 // Returns true if the observed form has both the current and new password
88 // fields, and the username field was not explicitly marked with 88 // fields, and the username field was not explicitly marked with
89 // autocomplete=username. In these cases it is not clear whether the username 89 // "autocomplete=username" and the user-typed username and current password
90 // field is the right guess (often such change password forms do not contain 90 // field values do not match the credentials already stored. In these cases it
91 // the username at all), and the user should not be bothered with saving a 91 // is not clear whether the username field is the right guess (often such
92 // potentially malformed credential. Once we handle change password forms 92 // change password forms do not contain the username at all), and the user
93 // correctly, or http://crbug.com/448351 gets implemented, this method should 93 // should not be bothered with saving a potentially malformed credential. Once
94 // be replaced accordingly. 94 // we handle change password forms correctly, this method should be replaced
95 bool IsIgnorableChangePasswordForm() const; 95 // accordingly.
96 bool IsIgnorableChangePasswordForm(
97 const base::string16& typed_username,
98 const base::string16& typed_password) const;
96 99
97 // Determines if the user opted to 'never remember' passwords for this form. 100 // Determines if the user opted to 'never remember' passwords for this form.
98 bool IsBlacklisted() const; 101 bool IsBlacklisted() const;
99 102
100 // Used by PasswordManager to determine whether or not to display 103 // Used by PasswordManager to determine whether or not to display
101 // a SavePasswordBar when given the green light to save the PasswordForm 104 // a SavePasswordBar when given the green light to save the PasswordForm
102 // managed by this. 105 // managed by this.
103 bool IsNewLogin() const; 106 bool IsNewLogin() const;
104 107
105 // Returns true if the current pending credentials were found using 108 // Returns true if the current pending credentials were found using
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ManagerAction manager_action_; 359 ManagerAction manager_action_;
357 UserAction user_action_; 360 UserAction user_action_;
358 SubmitResult submit_result_; 361 SubmitResult submit_result_;
359 362
360 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); 363 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager);
361 }; 364 };
362 365
363 } // namespace password_manager 366 } // namespace password_manager
364 367
365 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ 368 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698