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

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

Issue 1001043004: Revamp desktop Autofill settings, round 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest Created 5 years, 9 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_CREDIT_CARD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "components/autofill/core/browser/autofill_data_model.h" 15 #include "components/autofill/core/browser/autofill_data_model.h"
15 16
16 namespace autofill { 17 namespace autofill {
17 18
18 // A form group that stores credit card information. 19 // A form group that stores credit card information.
19 class CreditCard : public AutofillDataModel { 20 class CreditCard : public AutofillDataModel {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const std::string& app_locale, 88 const std::string& app_locale,
88 ServerFieldTypeSet* matching_types) const override; 89 ServerFieldTypeSet* matching_types) const override;
89 base::string16 GetRawInfo(ServerFieldType type) const override; 90 base::string16 GetRawInfo(ServerFieldType type) const override;
90 void SetRawInfo(ServerFieldType type, const base::string16& value) override; 91 void SetRawInfo(ServerFieldType type, const base::string16& value) override;
91 base::string16 GetInfo(const AutofillType& type, 92 base::string16 GetInfo(const AutofillType& type,
92 const std::string& app_locale) const override; 93 const std::string& app_locale) const override;
93 bool SetInfo(const AutofillType& type, 94 bool SetInfo(const AutofillType& type,
94 const base::string16& value, 95 const base::string16& value,
95 const std::string& app_locale) override; 96 const std::string& app_locale) override;
96 97
97 // Credit card preview summary, for example: Visa - 1234, Exp: 01/2020 98 // Credit card preview summary, for example: "Visa - 1234", ", 01/2020".
98 // Used for settings and the requestAutocomplete dialog, but not 99 const std::pair<base::string16, base::string16> LabelPieces() const;
99 // the autofill dropdown. 100
101 // Like LabelPieces, but appends the two pieces together.
100 const base::string16 Label() const; 102 const base::string16 Label() const;
101 103
102 // Special method to set value for HTML5 month input type. 104 // Special method to set value for HTML5 month input type.
103 void SetInfoForMonthInputType(const base::string16& value); 105 void SetInfoForMonthInputType(const base::string16& value);
104 106
105 // The last four digits of the credit card number (or possibly less if there 107 // The last four digits of the credit card number (or possibly less if there
106 // aren't enough characters). 108 // aren't enough characters).
107 base::string16 LastFourDigits() const; 109 base::string16 LastFourDigits() const;
108 // The user-visible type of the card, e.g. 'Mastercard'. 110 // The user-visible type of the card, e.g. 'Mastercard'.
109 base::string16 TypeForDisplay() const; 111 base::string16 TypeForDisplay() const;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 extern const char* const kDiscoverCard; 228 extern const char* const kDiscoverCard;
227 extern const char* const kGenericCard; 229 extern const char* const kGenericCard;
228 extern const char* const kJCBCard; 230 extern const char* const kJCBCard;
229 extern const char* const kMasterCard; 231 extern const char* const kMasterCard;
230 extern const char* const kUnionPay; 232 extern const char* const kUnionPay;
231 extern const char* const kVisaCard; 233 extern const char* const kVisaCard;
232 234
233 } // namespace autofill 235 } // namespace autofill
234 236
235 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 237 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_profile.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698