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

Unified Diff: chrome/browser/autofill/wallet/wallet_items.h

Issue 11777007: Adds wallet::RequiredAction for when we start interacting with Online Wallet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix Created 7 years, 11 months 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/wallet_items.h
diff --git a/chrome/browser/autofill/wallet/wallet_items.h b/chrome/browser/autofill/wallet/wallet_items.h
index 1963c66c78a2e6c0b4ca51ad52f15a2b43e16fd6..5b93da29a1945b38c130528af88fce30ff09a957 100644
--- a/chrome/browser/autofill/wallet/wallet_items.h
+++ b/chrome/browser/autofill/wallet/wallet_items.h
@@ -21,13 +21,14 @@ class DictionaryValue;
namespace wallet {
+class RequiredAction;
class WalletItemsTest;
-// WalletItems primarily serves as a container for the user's instruments and
-// address, however, it also provides a transaction id which must be used
-// throughout all API calls being made using this data. Additionally, user
-// actions may be required before a purchase can be completed using Online
-// Wallet and those actions are present in the object as well.
+// WalletItems is a collection of cards and addresses that a user picks from to
+// construct a full wallet. However, it also provides a transaction ID which
+// must be used throughout all API calls being made using this data.
+// Additionally, user actions may be required before a purchase can be completed
+// using Online Wallet and those actions are present in the object as well.
class WalletItems {
public:
// Container for all information about a credit card except for it's card
@@ -158,7 +159,7 @@ class WalletItems {
DCHECK(legal_document.get());
legal_documents_.push_back(legal_document.release());
}
- const std::vector<std::string>& required_actions() const {
+ const std::vector<RequiredAction>& required_actions() const {
return required_actions_;
}
const std::string& google_transaction_id() const {
@@ -183,15 +184,13 @@ class WalletItems {
FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, CreateWalletItems);
FRIEND_TEST_ALL_PREFIXES(WalletItemsTest,
CreateWalletItemsWithRequiredActions);
- WalletItems(const std::vector<std::string>& required_actions,
+ WalletItems(const std::vector<RequiredAction>& required_actions,
const std::string& google_transaction_id,
const std::string& default_instrument_id,
const std::string& default_address_id);
// Actions that must be completed by the user before a FullWallet can be
// issued to them by the Online Wallet service.
- // TODO(ahutter): |required_actions_| should be members of an enum not
- // strings. See http://crbug.com/165195.
- std::vector<std::string> required_actions_;
+ std::vector<RequiredAction> required_actions_;
std::string google_transaction_id_;
std::string default_instrument_id_;
std::string default_address_id_;

Powered by Google App Engine
This is Rietveld 408576698