Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: components/autofill/core/browser/personal_data_manager.h

Issue 2894943002: Prevent existing card number to be used for new credit cards in the Payment Request (Closed)
Patch Set: Fixed unit tests crash Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Deletes all server profiles and cards (both masked and unmasked). 177 // Deletes all server profiles and cards (both masked and unmasked).
178 void ClearAllServerData(); 178 void ClearAllServerData();
179 179
180 // Sets a server credit card for test. 180 // Sets a server credit card for test.
181 void AddServerCreditCardForTest(std::unique_ptr<CreditCard> credit_card); 181 void AddServerCreditCardForTest(std::unique_ptr<CreditCard> credit_card);
182 182
183 // Returns the credit card with the specified |guid|, or nullptr if there is 183 // Returns the credit card with the specified |guid|, or nullptr if there is
184 // no credit card with the specified |guid|. 184 // no credit card with the specified |guid|.
185 virtual CreditCard* GetCreditCardByGUID(const std::string& guid); 185 virtual CreditCard* GetCreditCardByGUID(const std::string& guid);
186 186
187 // Returns the credit card with the specified |number|, or nullptr if there is
188 // no credit card with the specified |number|.
189 virtual CreditCard* GetCreditCardByNumber(const std::string& number);
190
187 // Gets the field types availabe in the stored address and credit card data. 191 // Gets the field types availabe in the stored address and credit card data.
188 void GetNonEmptyTypes(ServerFieldTypeSet* non_empty_types); 192 void GetNonEmptyTypes(ServerFieldTypeSet* non_empty_types);
189 193
190 // Returns true if the credit card information is stored with a password. 194 // Returns true if the credit card information is stored with a password.
191 bool HasPassword(); 195 bool HasPassword();
192 196
193 // Returns whether the personal data has been loaded from the web database. 197 // Returns whether the personal data has been loaded from the web database.
194 virtual bool IsDataLoaded() const; 198 virtual bool IsDataLoaded() const;
195 199
196 // This PersonalDataManager owns these profiles and credit cards. Their 200 // This PersonalDataManager owns these profiles and credit cards. Their
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // The context for the request to be used to fetch libaddressinput's address 618 // The context for the request to be used to fetch libaddressinput's address
615 // validation rules. 619 // validation rules.
616 scoped_refptr<net::URLRequestContextGetter> context_getter_; 620 scoped_refptr<net::URLRequestContextGetter> context_getter_;
617 621
618 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); 622 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
619 }; 623 };
620 624
621 } // namespace autofill 625 } // namespace autofill
622 626
623 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 627 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698