| 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_FULL_WALLET_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_FULL_WALLET_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_FULL_WALLET_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_FULL_WALLET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "components/autofill/browser/wallet/required_action.h" | 14 #include "components/autofill/browser/wallet/required_action.h" |
| 15 #include "components/autofill/browser/wallet/wallet_address.h" | 15 #include "components/autofill/browser/wallet/wallet_address.h" |
| 16 #include "components/autofill/common/autofill_export.h" |
| 16 | 17 |
| 17 namespace base { | 18 namespace base { |
| 18 class DictionaryValue; | 19 class DictionaryValue; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace autofill { | 22 namespace autofill { |
| 22 namespace wallet { | 23 namespace wallet { |
| 23 | 24 |
| 24 class FullWalletTest; | 25 class FullWalletTest; |
| 25 | 26 |
| 26 // FullWallet contains all the information a merchant requires from a user for | 27 // FullWallet contains all the information a merchant requires from a user for |
| 27 // that user to make a purchase. This includes: | 28 // that user to make a purchase. This includes: |
| 28 // - billing information | 29 // - billing information |
| 29 // - shipping information | 30 // - shipping information |
| 30 // - a proxy card for the backing card selected from a user's wallet items | 31 // - a proxy card for the backing card selected from a user's wallet items |
| 31 class FullWallet { | 32 class AUTOFILL_EXPORT FullWallet { |
| 32 public: | 33 public: |
| 33 ~FullWallet(); | 34 ~FullWallet(); |
| 34 | 35 |
| 35 // Returns an empty scoped_ptr if the input invalid, an empty wallet with | 36 // Returns an empty scoped_ptr if the input invalid, an empty wallet with |
| 36 // required actions if there are any, or a valid wallet. | 37 // required actions if there are any, or a valid wallet. |
| 37 static scoped_ptr<FullWallet> | 38 static scoped_ptr<FullWallet> |
| 38 CreateFullWallet(const base::DictionaryValue& dictionary); | 39 CreateFullWallet(const base::DictionaryValue& dictionary); |
| 39 | 40 |
| 40 // Returns corresponding data for |type|. | 41 // Returns corresponding data for |type|. |
| 41 base::string16 GetInfo(AutofillFieldType type); | 42 base::string16 GetInfo(AutofillFieldType type); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // The one time pad used for FullWallet encryption. | 120 // The one time pad used for FullWallet encryption. |
| 120 std::vector<uint8> one_time_pad_; | 121 std::vector<uint8> one_time_pad_; |
| 121 | 122 |
| 122 DISALLOW_COPY_AND_ASSIGN(FullWallet); | 123 DISALLOW_COPY_AND_ASSIGN(FullWallet); |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace wallet | 126 } // namespace wallet |
| 126 } // namespace autofill | 127 } // namespace autofill |
| 127 | 128 |
| 128 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_FULL_WALLET_H_ | 129 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_FULL_WALLET_H_ |
| OLD | NEW |