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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // updates in |profiles| make it to the DB. This is why SetProfiles will | 93 // updates in |profiles| make it to the DB. This is why SetProfiles will |
94 // invoke Refresh after finishing, to ensure we get into a | 94 // invoke Refresh after finishing, to ensure we get into a |
95 // consistent state. See Refresh for details. | 95 // consistent state. See Refresh for details. |
96 void SetProfiles(std::vector<AutoFillProfile>* profiles); | 96 void SetProfiles(std::vector<AutoFillProfile>* profiles); |
97 | 97 |
98 // Sets |credit_cards_| to the contents of |credit_cards| and updates the web | 98 // Sets |credit_cards_| to the contents of |credit_cards| and updates the web |
99 // database by adding, updating and removing credit cards. Sets the unique | 99 // database by adding, updating and removing credit cards. Sets the unique |
100 // ID of newly-added profiles. | 100 // ID of newly-added profiles. |
101 void SetCreditCards(std::vector<CreditCard>* credit_cards); | 101 void SetCreditCards(std::vector<CreditCard>* credit_cards); |
102 | 102 |
| 103 // Removes the profile represented by |unique_id|. |
| 104 void RemoveProfile(int unique_id); |
| 105 |
| 106 // Removes the credit card represented by |unique_id|. |
| 107 void RemoveCreditCard(int unique_id); |
| 108 |
103 // Gets the possible field types for the given text, determined by matching | 109 // Gets the possible field types for the given text, determined by matching |
104 // the text with all known personal information and returning matching types. | 110 // the text with all known personal information and returning matching types. |
105 void GetPossibleFieldTypes(const string16& text, | 111 void GetPossibleFieldTypes(const string16& text, |
106 FieldTypeSet* possible_types); | 112 FieldTypeSet* possible_types); |
107 | 113 |
108 // 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. |
109 bool HasPassword(); | 115 bool HasPassword(); |
110 | 116 |
111 // 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. |
112 virtual bool IsDataLoaded() const { return is_data_loaded_; } | 118 virtual bool IsDataLoaded() const { return is_data_loaded_; } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 WebDataService::Handle pending_profiles_query_; | 264 WebDataService::Handle pending_profiles_query_; |
259 WebDataService::Handle pending_creditcards_query_; | 265 WebDataService::Handle pending_creditcards_query_; |
260 | 266 |
261 // The observers. | 267 // The observers. |
262 ObserverList<Observer> observers_; | 268 ObserverList<Observer> observers_; |
263 | 269 |
264 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 270 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
265 }; | 271 }; |
266 | 272 |
267 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 273 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
OLD | NEW |