OLD | NEW |
---|---|
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_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
7 | 7 |
8 // This file was contains some repeated code from | 8 // This file was contains some repeated code from |
9 // chrome/renderer/autofill/password_autofill_manager because as we move to the | 9 // chrome/renderer/autofill/password_autofill_manager because as we move to the |
10 // new Autofill UI we needs these functions in both the browser and renderer. | 10 // new Autofill UI we needs these functions in both the browser and renderer. |
(...skipping 18 matching lines...) Expand all Loading... | |
29 // Fills the password associated with user name |username|. Returns true if | 29 // Fills the password associated with user name |username|. Returns true if |
30 // the username and password fields were filled, false otherwise. | 30 // the username and password fields were filled, false otherwise. |
31 bool DidAcceptAutofillSuggestion(const FormFieldData& field, | 31 bool DidAcceptAutofillSuggestion(const FormFieldData& field, |
32 const base::string16& username); | 32 const base::string16& username); |
33 | 33 |
34 // Invoked when a password mapping is added. | 34 // Invoked when a password mapping is added. |
35 void AddPasswordFormMapping( | 35 void AddPasswordFormMapping( |
36 const FormFieldData& username_element, | 36 const FormFieldData& username_element, |
37 const PasswordFormFillData& password); | 37 const PasswordFormFillData& password); |
38 | 38 |
39 // Clear the login associated with the field |field| | |
vabr (Chromium)
2014/04/04 10:51:40
nit: this breaks too early (use the whole line)
vabr (Chromium)
2014/04/04 10:51:40
"Clear the login" sounds ambiguous to me. What is
rchtara
2014/04/04 16:07:20
Done.
rchtara
2014/04/04 16:07:20
Done.
| |
40 // and the user name |username_to_remove|. Returns true if the user name and | |
41 // password were removed. | |
42 bool RemovePasswordSuggestion(const FormFieldData& field, | |
43 const base::string16& username_to_remove); | |
44 | |
39 // Invoked to clear any page specific cached values. | 45 // Invoked to clear any page specific cached values. |
40 void Reset(); | 46 void Reset(); |
41 | 47 |
42 private: | 48 private: |
43 // TODO(csharp): Modify the AutofillExternalDeletegate code so that it can | 49 // TODO(csharp): Modify the AutofillExternalDeletegate code so that it can |
44 // figure out if a entry is a password one without using this mapping. | 50 // figure out if a entry is a password one without using this mapping. |
45 // crbug.com/118601 | 51 // crbug.com/118601 |
46 typedef std::map<FormFieldData, | 52 typedef std::map<FormFieldData, |
47 PasswordFormFillData> | 53 PasswordFormFillData> |
48 LoginToPasswordInfoMap; | 54 LoginToPasswordInfoMap; |
(...skipping 13 matching lines...) Expand all Loading... | |
62 | 68 |
63 // Provides driver-level context to the shared code of the component. Must | 69 // Provides driver-level context to the shared code of the component. Must |
64 // outlive |this|. | 70 // outlive |this|. |
65 AutofillDriver* const autofill_driver_; // weak | 71 AutofillDriver* const autofill_driver_; // weak |
66 | 72 |
67 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); | 73 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); |
68 }; | 74 }; |
69 | 75 |
70 } // namespace autofill | 76 } // namespace autofill |
71 | 77 |
72 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 78 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
OLD | NEW |