| 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 <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // profile with the specified |guid|. Both web and auxiliary profiles may | 138 // profile with the specified |guid|. Both web and auxiliary profiles may |
| 139 // be returned. | 139 // be returned. |
| 140 AutofillProfile* GetProfileByGUID(const std::string& guid); | 140 AutofillProfile* GetProfileByGUID(const std::string& guid); |
| 141 | 141 |
| 142 // Returns the profile with the specified |guid| from the given |profiles|, or | 142 // Returns the profile with the specified |guid| from the given |profiles|, or |
| 143 // nullptr if there is no profile with the specified |guid|. | 143 // nullptr if there is no profile with the specified |guid|. |
| 144 static AutofillProfile* GetProfileFromProfilesByGUID( | 144 static AutofillProfile* GetProfileFromProfilesByGUID( |
| 145 const std::string& guid, | 145 const std::string& guid, |
| 146 const std::vector<AutofillProfile*>& profiles); | 146 const std::vector<AutofillProfile*>& profiles); |
| 147 | 147 |
| 148 // Adds |credit_card| to the web database. | 148 // Adds |credit_card| to the web database as a local card. |
| 149 virtual void AddCreditCard(const CreditCard& credit_card); | 149 virtual void AddCreditCard(const CreditCard& credit_card); |
| 150 | 150 |
| 151 // Updates |credit_card| which already exists in the web database. This | 151 // Updates |credit_card| which already exists in the web database. This |
| 152 // can only be used on local credit cards. | 152 // can only be used on local credit cards. |
| 153 virtual void UpdateCreditCard(const CreditCard& credit_card); | 153 virtual void UpdateCreditCard(const CreditCard& credit_card); |
| 154 | 154 |
| 155 // Adds |credit_card| to the web database as a full server card. |
| 156 virtual void AddServerCreditCard(const CreditCard& credit_card); |
| 157 |
| 155 // Update a server card. Only the full number and masked/unmasked | 158 // Update a server card. Only the full number and masked/unmasked |
| 156 // status can be changed. Looks up the card by server ID. | 159 // status can be changed. Looks up the card by server ID. |
| 157 virtual void UpdateServerCreditCard(const CreditCard& credit_card); | 160 virtual void UpdateServerCreditCard(const CreditCard& credit_card); |
| 158 | 161 |
| 159 // Updates the use stats and billing address id for the server |credit_card|. | 162 // Updates the use stats and billing address id for the server |credit_card|. |
| 160 // Looks up the card by server_id. | 163 // Looks up the card by server_id. |
| 161 void UpdateServerCardMetadata(const CreditCard& credit_card); | 164 void UpdateServerCardMetadata(const CreditCard& credit_card); |
| 162 | 165 |
| 163 // Resets the card for |guid| to the masked state. | 166 // Resets the card for |guid| to the masked state. |
| 164 void ResetFullServerCard(const std::string& guid); | 167 void ResetFullServerCard(const std::string& guid); |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 // The context for the request to be used to fetch libaddressinput's address | 604 // The context for the request to be used to fetch libaddressinput's address |
| 602 // validation rules. | 605 // validation rules. |
| 603 scoped_refptr<net::URLRequestContextGetter> context_getter_; | 606 scoped_refptr<net::URLRequestContextGetter> context_getter_; |
| 604 | 607 |
| 605 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 608 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 606 }; | 609 }; |
| 607 | 610 |
| 608 } // namespace autofill | 611 } // namespace autofill |
| 609 | 612 |
| 610 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 613 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |