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

Side by Side Diff: components/autofill/core/common/password_form.h

Issue 356223002: PasswordForm: move from current/old password scheme to current/new. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // has implemented some form of autofill. 109 // has implemented some form of autofill.
110 base::string16 username_value; 110 base::string16 username_value;
111 111
112 // This member is populated in cases where we there are multiple input 112 // This member is populated in cases where we there are multiple input
113 // elements that could possibly be the username. Used when our heuristics for 113 // elements that could possibly be the username. Used when our heuristics for
114 // determining the username are incorrect. Optional. 114 // determining the username are incorrect. Optional.
115 // 115 //
116 // When parsing an HTML form, this is typically empty. 116 // When parsing an HTML form, this is typically empty.
117 std::vector<base::string16> other_possible_usernames; 117 std::vector<base::string16> other_possible_usernames;
118 118
119 // The name of the password input element, Optional (improves scoring). 119 // The name of the input element corresponding to the current password.
120 // Optional (improves scoring).
120 // 121 //
121 // When parsing an HTML form, this must always be set. 122 // When parsing an HTML form, this must always be set, unless it is a sign-up
123 // form or a change password form that does not ask for the current password.
124 // In these two cases the |new_password_element| will always be set.
122 base::string16 password_element; 125 base::string16 password_element;
123 126
124 // The password. Required. 127 // The current password. Required.
Ilya Sherman 2014/07/01 03:08:47 In what sense is this field required, if the one a
engedy 2014/07/03 13:34:19 Tried to clarify, but I am not sure myself. @Vacl
vabr (Chromium) 2014/07/03 14:42:56 According to the comments, the password_value is "
engedy 2014/07/03 18:47:36 I have rephrased.
125 // 128 //
126 // When parsing an HTML form, this is typically empty. 129 // When parsing an HTML form, this is typically empty.
127 base::string16 password_value; 130 base::string16 password_value;
128 131
129 // False if autocomplete is set to "off" for the password input element; 132 // False if autocomplete is set to "off" for the password input element;
130 // True otherwise. 133 // True otherwise.
131 bool password_autocomplete_set; 134 bool password_autocomplete_set;
132 135
133 // If the form was a change password form, the name of the 136 // If the form was a sign-up or a change password form, the name of the input
134 // 'old password' input element. Optional. 137 // element corresponding to the new password. Optional.
135 base::string16 old_password_element; 138 base::string16 new_password_element;
136 139
137 // The old password. Optional. 140 // The new password. Optional.
138 base::string16 old_password_value; 141 base::string16 new_password_value;
139 142
140 // Whether or not this login was saved under an HTTPS session with a valid 143 // Whether or not this login was saved under an HTTPS session with a valid
141 // SSL cert. We will never match or autofill a PasswordForm where 144 // SSL cert. We will never match or autofill a PasswordForm where
142 // ssl_valid == true with a PasswordForm where ssl_valid == false. This means 145 // ssl_valid == true with a PasswordForm where ssl_valid == false. This means
143 // passwords saved under HTTPS will never get autofilled onto an HTTP page. 146 // passwords saved under HTTPS will never get autofilled onto an HTTP page.
144 // When importing, this should be set to true if the page URL is HTTPS, thus 147 // When importing, this should be set to true if the page URL is HTTPS, thus
145 // giving it "the benefit of the doubt" that the SSL cert was valid when it 148 // giving it "the benefit of the doubt" that the SSL cert was valid when it
146 // was saved. Default to false. 149 // was saved. Default to false.
147 bool ssl_valid; 150 bool ssl_valid;
148 151
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Map username to PasswordForm* for convenience. See password_form_manager.h. 219 // Map username to PasswordForm* for convenience. See password_form_manager.h.
217 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; 220 typedef std::map<base::string16, PasswordForm*> PasswordFormMap;
218 221
219 // For testing. 222 // For testing.
220 std::ostream& operator<<(std::ostream& os, 223 std::ostream& operator<<(std::ostream& os,
221 const autofill::PasswordForm& form); 224 const autofill::PasswordForm& form);
222 225
223 } // namespace autofill 226 } // namespace autofill
224 227
225 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 228 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698