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

Unified 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: Changes from Dane's review 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/wallet/full_wallet.h
diff --git a/chrome/browser/autofill/wallet/full_wallet.h b/chrome/browser/autofill/wallet/full_wallet.h
new file mode 100644
index 0000000000000000000000000000000000000000..44d6aef0fa4709997b4f7bc51df76aaec0fe20fb
--- /dev/null
+++ b/chrome/browser/autofill/wallet/full_wallet.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_
+#define CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_
+
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/autofill/wallet/wallet_address.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace wallet {
+
+class FullWallet {
+ friend std::ostream& operator<<(std::ostream& o,
+ const FullWallet& full_wallet);
+
+ public:
+ FullWallet(int expiration_month,
+ int expiration_year,
+ const std::string& iin,
+ const std::string& rest,
+ Address* billing_address,
+ Address* shipping_address,
+ const std::vector<std::string> required_actions);
+ ~FullWallet();
+ 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.
+ const std::string GetPAN(void* bytes, size_t length) const;
+ const std::string GetCVN(void* bytes, size_t length) const;
+ bool operator==(const FullWallet& other) const;
+ bool operator!=(const FullWallet& other) const;
+
+ const Address* get_billing_address() const { return billing_address_.get(); }
+ const Address* get_shipping_address() const {
+ return shipping_address_.get();
+ }
+ 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.
+ return required_actions_;
+ }
+ const int get_expiration_month() const { return expiration_month_; }
+ const int get_expiration_year() const { return expiration_year_; }
+
+ private:
+ int expiration_month_;
+ int expiration_year_;
+ std::string iin_;
+ std::string rest_;
+ scoped_ptr<Address> billing_address_;
+ scoped_ptr<Address> shipping_address_;
+ std::vector<std::string> required_actions_;
+ DISALLOW_COPY_AND_ASSIGN(FullWallet);
+};
+
+} // end namespace wallet
+
+#endif // CHROME_BROWSER_AUTOFILL_WALLET_FULL_WALLET_H_

Powered by Google App Engine
This is Rietveld 408576698