OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Sets the listener to be notified of PersonalDataManager events. | 60 // Sets the listener to be notified of PersonalDataManager events. |
61 virtual void SetObserver(PersonalDataManager::Observer* observer); | 61 virtual void SetObserver(PersonalDataManager::Observer* observer); |
62 | 62 |
63 // Removes |observer| as the observer of this PersonalDataManager. | 63 // Removes |observer| as the observer of this PersonalDataManager. |
64 virtual void RemoveObserver(PersonalDataManager::Observer* observer); | 64 virtual void RemoveObserver(PersonalDataManager::Observer* observer); |
65 | 65 |
66 // If AutoFill is able to determine the field types of a significant number of | 66 // If AutoFill is able to determine the field types of a significant number of |
67 // field types that contain information in the FormStructures a profile will | 67 // field types that contain information in the FormStructures a profile will |
68 // be created with all of the information from recognized fields. Returns | 68 // be created with all of the information from recognized fields. Returns |
69 // whether a profile was created. | 69 // whether a profile was created. |
70 bool ImportFormData(const std::vector<FormStructure*>& form_structures); | 70 bool ImportFormData(const std::vector<const FormStructure*>& form_structures); |
71 | 71 |
72 // Gets |imported_profile_| and |imported_credit_card_| and returns their | 72 // Gets |imported_profile_| and |imported_credit_card_| and returns their |
73 // values in |profile| and |credit_card| parameters respectively. One or | 73 // values in |profile| and |credit_card| parameters respectively. One or |
74 // both may return NULL. The objects returned are owned by the | 74 // both may return NULL. The objects returned are owned by the |
75 // PersonalDataManager, so should be considered weak references by caller. | 75 // PersonalDataManager, so should be considered weak references by caller. |
76 // TODO(dhollowa) Now that we aren't immediately saving the imported form | 76 // TODO(dhollowa) Now that we aren't immediately saving the imported form |
77 // data, we should store the profile and CC in the AFM instead of the PDM. | 77 // data, we should store the profile and CC in the AFM instead of the PDM. |
78 void GetImportedFormData(AutoFillProfile** profile, CreditCard** credit_card); | 78 void GetImportedFormData(AutoFillProfile** profile, CreditCard** credit_card); |
79 | 79 |
80 // Saves a credit card value detected in |ImportedFormData|. | 80 // Saves a credit card value detected in |ImportedFormData|. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 WebDataService::Handle pending_profiles_query_; | 244 WebDataService::Handle pending_profiles_query_; |
245 WebDataService::Handle pending_creditcards_query_; | 245 WebDataService::Handle pending_creditcards_query_; |
246 | 246 |
247 // The observers. | 247 // The observers. |
248 ObserverList<Observer> observers_; | 248 ObserverList<Observer> observers_; |
249 | 249 |
250 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 250 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
251 }; | 251 }; |
252 | 252 |
253 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 253 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
OLD | NEW |