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

Side by Side Diff: webkit/forms/password_form_dom_manager.h

Issue 9625026: Save password without an associated username. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Modify some indents in the code Created 8 years, 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H_ 5 #ifndef WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H_
6 #define WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H_ 6 #define WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "webkit/forms/form_data.h" 10 #include "webkit/forms/form_data.h"
(...skipping 12 matching lines...) Expand all
23 // password for login, while 23 // password for login, while
24 // additional_logins is a list of other matching user/pass pairs for the form. 24 // additional_logins is a list of other matching user/pass pairs for the form.
25 // wait_for_username tells us whether we need to wait for the user to enter 25 // wait_for_username tells us whether we need to wait for the user to enter
26 // a valid username before we autofill the password. By default, this is off 26 // a valid username before we autofill the password. By default, this is off
27 // unless the PasswordManager determined there is an additional risk 27 // unless the PasswordManager determined there is an additional risk
28 // associated with this form. This can happen, for example, if action URI's 28 // associated with this form. This can happen, for example, if action URI's
29 // of the observed form and our saved representation don't match up. 29 // of the observed form and our saved representation don't match up.
30 struct WEBKIT_FORMS_EXPORT PasswordFormFillData { 30 struct WEBKIT_FORMS_EXPORT PasswordFormFillData {
31 typedef std::map<string16, string16> LoginCollection; 31 typedef std::map<string16, string16> LoginCollection;
32 32
33 // You should set a password basic_data.fields[0].
34 // If there's a username, you should set the username basic_data.fields[1].
35 // So, If basic_data.size() == 2, we judge it has username and password.
36 // And, basic_data.size() == 1, we judge it has only password.
37 // Otherwise, we supporse that it has wrong datas.
Ilya Sherman 2012/04/19 00:27:37 nit: Wording suggestion: """basic_data.fields[0]
33 FormData basic_data; 38 FormData basic_data;
34 LoginCollection additional_logins; 39 LoginCollection additional_logins;
35 bool wait_for_username; 40 bool wait_for_username;
36 PasswordFormFillData(); 41 PasswordFormFillData();
37 ~PasswordFormFillData(); 42 ~PasswordFormFillData();
38 }; 43 };
39 44
40 class PasswordFormDomManager { 45 class PasswordFormDomManager {
41 public: 46 public:
42 // Create a PasswordForm from DOM form. Webkit doesn't allow storing 47 // Create a PasswordForm from DOM form. Webkit doesn't allow storing
(...skipping 15 matching lines...) Expand all
58 bool wait_for_username_before_autofill, 63 bool wait_for_username_before_autofill,
59 PasswordFormFillData* result); 64 PasswordFormFillData* result);
60 private: 65 private:
61 DISALLOW_IMPLICIT_CONSTRUCTORS(PasswordFormDomManager); 66 DISALLOW_IMPLICIT_CONSTRUCTORS(PasswordFormDomManager);
62 }; 67 };
63 68
64 } // namespace forms 69 } // namespace forms
65 } // namespace webkit 70 } // namespace webkit
66 71
67 #endif // WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H__ 72 #endif // WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698