OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_COMMON_PASSWORD_FORM_FILL_DATA_H_ | |
6 #define CONTENT_PUBLIC_COMMON_PASSWORD_FORM_FILL_DATA_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "content/common/content_export.h" | |
12 #include "content/public/common/form_data.h" | |
13 #include "content/public/common/password_form.h" | |
14 | |
15 namespace content { | |
16 | |
17 // Structure used for autofilling password forms. | |
18 // basic_data identifies the HTML form on the page and preferred username/ | |
19 // password for login, while | |
20 // additional_logins is a list of other matching user/pass pairs for the form. | |
21 // wait_for_username tells us whether we need to wait for the user to enter | |
22 // a valid username before we autofill the password. By default, this is off | |
23 // unless the PasswordManager determined there is an additional risk | |
24 // associated with this form. This can happen, for example, if action URI's | |
25 // of the observed form and our saved representation don't match up. | |
26 struct CONTENT_EXPORT PasswordFormFillData { | |
27 typedef std::map<string16, string16> LoginCollection; | |
28 | |
29 FormData basic_data; | |
30 LoginCollection additional_logins; | |
31 bool wait_for_username; | |
32 PasswordFormFillData(); | |
33 ~PasswordFormFillData(); | |
34 }; | |
35 | |
36 // Create a FillData structure in preparation for autofilling a form, | |
37 // from basic_data identifying which form to fill, and a collection of | |
38 // matching stored logins to use as username/password values. | |
39 // preferred_match should equal (address) one of matches. | |
40 // wait_for_username_before_autofill is true if we should not autofill | |
41 // anything until the user typed in a valid username and blurred the field. | |
42 CONTENT_EXPORT void initPasswordFormFillData( | |
stuartmorgan
2012/10/02 12:17:51
s/init/Init/
Should this be a static method on Pa
jam
2012/10/02 16:18:14
structs don't have methods per style guide, so you
blundell
2012/10/03 15:06:07
Done.
| |
43 const PasswordForm& form_on_page, | |
44 const PasswordFormMap& matches, | |
45 const PasswordForm* const preferred_match, | |
46 bool wait_for_username_before_autofill, | |
47 PasswordFormFillData* result); | |
48 | |
49 } // namespace content | |
50 | |
51 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_FILL_DATA_H__ | |
OLD | NEW |