| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_WALLET_WALLET_ITEMS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 const gfx::Image& CardIcon() const; | 81 const gfx::Image& CardIcon() const; |
| 82 | 82 |
| 83 // Returns a pair of strings that summarizes this CC, | 83 // Returns a pair of strings that summarizes this CC, |
| 84 // suitable for display to the user. | 84 // suitable for display to the user. |
| 85 string16 DisplayName() const; | 85 string16 DisplayName() const; |
| 86 string16 DisplayNameDetail() const; | 86 string16 DisplayNameDetail() const; |
| 87 | 87 |
| 88 // Gets info that corresponds with |type|. | 88 // Gets info that corresponds with |type|. |
| 89 string16 GetInfo(AutofillFieldType type) const; | 89 string16 GetInfo(AutofillFieldType type) const; |
| 90 | 90 |
| 91 // Returns the display type of the and last four digits (e.g. Visa - 4444). |
| 92 string16 TypeAndLastFourDigits() const; |
| 93 |
| 91 const string16& descriptive_name() const { return descriptive_name_; } | 94 const string16& descriptive_name() const { return descriptive_name_; } |
| 92 const Type& type() const { return type_; } | 95 const Type& type() const { return type_; } |
| 93 const std::vector<string16>& supported_currencies() const { | 96 const std::vector<string16>& supported_currencies() const { |
| 94 return supported_currencies_; | 97 return supported_currencies_; |
| 95 } | 98 } |
| 96 const string16& last_four_digits() const { return last_four_digits_; } | 99 const string16& last_four_digits() const { return last_four_digits_; } |
| 97 int expiration_month() const { return expiration_month_; } | 100 int expiration_month() const { return expiration_month_; } |
| 98 int expiration_year() const { return expiration_year_; } | 101 int expiration_year() const { return expiration_year_; } |
| 99 const Address& address() const { return *address_; } | 102 const Address& address() const { return *address_; } |
| 100 const Status& status() const { return status_; } | 103 const Status& status() const { return status_; } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 211 } |
| 209 void AddAddress(scoped_ptr<Address> address) { | 212 void AddAddress(scoped_ptr<Address> address) { |
| 210 DCHECK(address.get()); | 213 DCHECK(address.get()); |
| 211 addresses_.push_back(address.release()); | 214 addresses_.push_back(address.release()); |
| 212 } | 215 } |
| 213 void AddLegalDocument(scoped_ptr<LegalDocument> legal_document) { | 216 void AddLegalDocument(scoped_ptr<LegalDocument> legal_document) { |
| 214 DCHECK(legal_document.get()); | 217 DCHECK(legal_document.get()); |
| 215 legal_documents_.push_back(legal_document.release()); | 218 legal_documents_.push_back(legal_document.release()); |
| 216 } | 219 } |
| 217 | 220 |
| 221 // Return the corresponding instrument for |id| or NULL if it doesn't exist. |
| 222 const WalletItems::MaskedInstrument* GetInstrumentById( |
| 223 const std::string& object_id) const; |
| 224 |
| 218 // Whether or not |action| is in |required_actions_|. | 225 // Whether or not |action| is in |required_actions_|. |
| 219 bool HasRequiredAction(RequiredAction action) const; | 226 bool HasRequiredAction(RequiredAction action) const; |
| 220 | 227 |
| 221 const std::vector<RequiredAction>& required_actions() const { | 228 const std::vector<RequiredAction>& required_actions() const { |
| 222 return required_actions_; | 229 return required_actions_; |
| 223 } | 230 } |
| 224 const std::string& google_transaction_id() const { | 231 const std::string& google_transaction_id() const { |
| 225 return google_transaction_id_; | 232 return google_transaction_id_; |
| 226 } | 233 } |
| 227 const std::vector<MaskedInstrument*>& instruments() const { | 234 const std::vector<MaskedInstrument*>& instruments() const { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // Legal documents the user must accept before using Online Wallet. | 282 // Legal documents the user must accept before using Online Wallet. |
| 276 ScopedVector<LegalDocument> legal_documents_; | 283 ScopedVector<LegalDocument> legal_documents_; |
| 277 | 284 |
| 278 DISALLOW_COPY_AND_ASSIGN(WalletItems); | 285 DISALLOW_COPY_AND_ASSIGN(WalletItems); |
| 279 }; | 286 }; |
| 280 | 287 |
| 281 } // namespace wallet | 288 } // namespace wallet |
| 282 } // namespace autofill | 289 } // namespace autofill |
| 283 | 290 |
| 284 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ | 291 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
| OLD | NEW |