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

Side by Side Diff: chrome/browser/autofill/wallet/full_wallet.h

Issue 11293078: Integrating Online Wallet into Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests. Real encryption/decryption. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(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 scoped_ptr<FullWallet> FromDictionary(
36 base::DictionaryValue* dictionary);
37 const std::string GetPAN(void* bytes, size_t length) const;
38 const std::string GetCVN(void* bytes, size_t length) const;
39 bool operator==(const FullWallet& other) const;
40 bool operator!=(const FullWallet& other) const;
41
42 const Address* GetBillingAddress() const { return billing_address_.get(); }
43 const Address* GetShippingAddress() const { return shipping_address_.get(); }
44 const std::vector<std::string> GetRequiredActions() const {
45 return required_actions_;
46 }
47 const int GetExpirationMonth() const { return expiration_month_; }
48 const int GetExpirationYear() const { return expiration_year_; }
49
50 private:
51 int expiration_month_;
52 int expiration_year_;
53 std::string iin_;
54 std::string rest_;
55 scoped_ptr<Address> billing_address_;
56 scoped_ptr<Address> shipping_address_;
57 std::vector<std::string> required_actions_;
58 DISALLOW_COPY_AND_ASSIGN(FullWallet);
59 };
60
61 } // end namespace wallet
62
63 #endif // CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698