OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ | |
7 | |
8 #include <ostream> | |
9 #include <string> | |
10 #include <vector> | |
11 | |
12 #include "base/basictypes.h" | |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "chrome/browser/autofill/wallet/wallet_address.h" | |
15 | |
16 namespace base { | |
17 class DictionaryValue; | |
18 } | |
19 | |
20 namespace wallet { | |
21 | |
22 class FullWallet { | |
23 friend std::ostream& operator<<(std::ostream& o, | |
24 const FullWallet& full_wallet); | |
25 | |
26 public: | |
27 FullWallet(int expiration_month, | |
28 int expiration_year, | |
29 const std::string& iin, | |
30 const std::string& rest, | |
31 Address* billing_address, | |
32 Address* shipping_address, | |
33 const std::vector<std::string> required_actions); | |
34 ~FullWallet(); | |
35 static FullWallet* CreateFromDictionary(base::DictionaryValue* dictionary); | |
Raman Kakilate
2012/11/17 02:28:31
We return empty wallet with required actions or nu
ahutter
2012/11/27 00:46:12
Done.
| |
36 const std::string GetPAN(void* bytes, size_t length) const; | |
37 const std::string GetCVN(void* bytes, size_t length) const; | |
38 bool operator==(const FullWallet& other) const; | |
39 bool operator!=(const FullWallet& other) const; | |
40 | |
41 const Address* get_billing_address() const { return billing_address_.get(); } | |
42 const Address* get_shipping_address() const { | |
43 return shipping_address_.get(); | |
44 } | |
45 const std::vector<std::string> get_required_actions() const { | |
benquan
2012/12/15 02:48:59
should this return reference?
ahutter
2012/12/17 17:23:02
It does in the most recent CL.
| |
46 return required_actions_; | |
47 } | |
48 const int get_expiration_month() const { return expiration_month_; } | |
49 const int get_expiration_year() const { return expiration_year_; } | |
50 | |
51 private: | |
52 int expiration_month_; | |
53 int expiration_year_; | |
54 std::string iin_; | |
55 std::string rest_; | |
56 scoped_ptr<Address> billing_address_; | |
57 scoped_ptr<Address> shipping_address_; | |
58 std::vector<std::string> required_actions_; | |
59 DISALLOW_COPY_AND_ASSIGN(FullWallet); | |
60 }; | |
61 | |
62 } // end namespace wallet | |
63 | |
64 #endif // CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_ | |
OLD | NEW |