| OLD | NEW |
| 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_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void GetNonEmptyTypes(FieldTypeSet* non_empty_types); | 112 void GetNonEmptyTypes(FieldTypeSet* non_empty_types); |
| 113 | 113 |
| 114 // Returns true if the credit card information is stored with a password. | 114 // Returns true if the credit card information is stored with a password. |
| 115 bool HasPassword(); | 115 bool HasPassword(); |
| 116 | 116 |
| 117 // Returns whether the personal data has been loaded from the web database. | 117 // Returns whether the personal data has been loaded from the web database. |
| 118 virtual bool IsDataLoaded() const; | 118 virtual bool IsDataLoaded() const; |
| 119 | 119 |
| 120 // This PersonalDataManager owns these profiles and credit cards. Their | 120 // This PersonalDataManager owns these profiles and credit cards. Their |
| 121 // lifetime is until the web database is updated with new profile and credit | 121 // lifetime is until the web database is updated with new profile and credit |
| 122 // card information, respectively. |profiles()| returns both web and | 122 // card information, respectively. |GetProfiles()| returns both web and |
| 123 // auxiliary profiles. |web_profiles()| returns only web profiles. | 123 // auxiliary profiles. |web_profiles()| returns only web profiles. |
| 124 virtual const std::vector<AutofillProfile*>& GetProfiles(); | 124 virtual const std::vector<AutofillProfile*>& GetProfiles(); |
| 125 virtual const std::vector<AutofillProfile*>& web_profiles() const; | 125 virtual const std::vector<AutofillProfile*>& web_profiles() const; |
| 126 virtual const std::vector<CreditCard*>& credit_cards() const; | 126 virtual const std::vector<CreditCard*>& GetCreditCards() const; |
| 127 | 127 |
| 128 // Loads profiles that can suggest data for |type|. |field_contents| is the | 128 // Loads profiles that can suggest data for |type|. |field_contents| is the |
| 129 // part the user has already typed. |field_is_autofilled| is true if the field | 129 // part the user has already typed. |field_is_autofilled| is true if the field |
| 130 // has already been autofilled. |other_field_types| represents the rest of | 130 // has already been autofilled. |other_field_types| represents the rest of |
| 131 // form. Identifying info is loaded into the last four outparams. | 131 // form. Identifying info is loaded into the last four outparams. |
| 132 void GetProfileSuggestions( | 132 void GetProfileSuggestions( |
| 133 AutofillFieldType type, | 133 AutofillFieldType type, |
| 134 const base::string16& field_contents, | 134 const base::string16& field_contents, |
| 135 bool field_is_autofilled, | 135 bool field_is_autofilled, |
| 136 std::vector<AutofillFieldType> other_field_types, | 136 std::vector<AutofillFieldType> other_field_types, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 // Whether we have already logged the number of profiles this session. | 283 // Whether we have already logged the number of profiles this session. |
| 284 mutable bool has_logged_profile_count_; | 284 mutable bool has_logged_profile_count_; |
| 285 | 285 |
| 286 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 286 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 } // namespace autofill | 289 } // namespace autofill |
| 290 | 290 |
| 291 #endif // COMPONENTS_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ | 291 #endif // COMPONENTS_AUTOFILL_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |