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_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // Scans the given |form| for importable Autofill data. If the form includes | 76 // Scans the given |form| for importable Autofill data. If the form includes |
77 // sufficient address data, it is immediately imported. If the form includes | 77 // sufficient address data, it is immediately imported. If the form includes |
78 // sufficient credit card data, it is stored into |credit_card|, so that we | 78 // sufficient credit card data, it is stored into |credit_card|, so that we |
79 // can prompt the user whether to save this data. | 79 // can prompt the user whether to save this data. |
80 // Returns |true| if sufficient address or credit card data was found. | 80 // Returns |true| if sufficient address or credit card data was found. |
81 bool ImportFormData(const FormStructure& form, | 81 bool ImportFormData(const FormStructure& form, |
82 scoped_ptr<CreditCard>* credit_card); | 82 scoped_ptr<CreditCard>* credit_card); |
83 | 83 |
84 // Called to indicate |data_model| was used (to fill in a form). Updates | 84 // Called to indicate |data_model| was used (to fill in a form). Updates |
85 // the database accordingly. | 85 // the database accordingly. Can invalidate |data_model|, particularly if |
| 86 // it's a Mac address book entry. |
86 virtual void RecordUseOf(const AutofillDataModel& data_model); | 87 virtual void RecordUseOf(const AutofillDataModel& data_model); |
87 | 88 |
88 // Saves |imported_profile| to the WebDB if it exists. Returns the guid of | 89 // Saves |imported_profile| to the WebDB if it exists. Returns the guid of |
89 // the new or updated profile, or the empty string if no profile was saved. | 90 // the new or updated profile, or the empty string if no profile was saved. |
90 virtual std::string SaveImportedProfile( | 91 virtual std::string SaveImportedProfile( |
91 const AutofillProfile& imported_profile); | 92 const AutofillProfile& imported_profile); |
92 | 93 |
93 // Saves a credit card value detected in |ImportedFormData|. Returns the guid | 94 // Saves a credit card value detected in |ImportedFormData|. Returns the guid |
94 // of the new or updated card, or the empty string if no card was saved. | 95 // of the new or updated card, or the empty string if no card was saved. |
95 virtual std::string SaveImportedCreditCard( | 96 virtual std::string SaveImportedCreditCard( |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 372 |
372 // An observer to listen for changes to prefs::kAutofillEnabled. | 373 // An observer to listen for changes to prefs::kAutofillEnabled. |
373 scoped_ptr<BooleanPrefMember> enabled_pref_; | 374 scoped_ptr<BooleanPrefMember> enabled_pref_; |
374 | 375 |
375 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 376 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
376 }; | 377 }; |
377 | 378 |
378 } // namespace autofill | 379 } // namespace autofill |
379 | 380 |
380 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 381 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
OLD | NEW |