| Index: chrome/browser/autofill/wallet/wallet_items.cc
|
| diff --git a/chrome/browser/autofill/wallet/wallet_items.cc b/chrome/browser/autofill/wallet/wallet_items.cc
|
| index 35307727e4a973c2efe45c09f52fabdeff12b966..c15c199cfeae00f2b6a6182707a7ec8a2a809b37 100644
|
| --- a/chrome/browser/autofill/wallet/wallet_items.cc
|
| +++ b/chrome/browser/autofill/wallet/wallet_items.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/values.h"
|
| +#include "chrome/browser/autofill/wallet/required_action.h"
|
|
|
| namespace {
|
|
|
| @@ -243,7 +244,7 @@ bool WalletItems::LegalDocument::operator!=(const LegalDocument& other) const {
|
| return !(*this == other);
|
| }
|
|
|
| -WalletItems::WalletItems(const std::vector<std::string>& required_actions,
|
| +WalletItems::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)
|
| @@ -262,13 +263,16 @@ scoped_ptr<WalletItems>
|
| return scoped_ptr<WalletItems>();
|
| }
|
|
|
| - std::vector<std::string> required_action;
|
| + std::vector<RequiredAction> required_action;
|
| const ListValue* required_action_list;
|
| if (dictionary.GetList("required_action", &required_action_list)) {
|
| for (size_t i = 0; i < required_action_list->GetSize(); ++i) {
|
| - std::string action;
|
| - if (required_action_list->GetString(i, &action))
|
| - required_action.push_back(action);
|
| + std::string action_string;
|
| + if (required_action_list->GetString(i, &action_string)) {
|
| + RequiredAction action(RequiredAction::ParseFromString(action_string));
|
| + if (action.AppliesToWalletItems())
|
| + required_action.push_back(action);
|
| + }
|
| }
|
| } else {
|
| DVLOG(1) << "Response from Google wallet missing required actions";
|
| @@ -349,7 +353,7 @@ bool WalletItems::operator==(const WalletItems& other) const {
|
| return google_transaction_id_ == other.google_transaction_id_ &&
|
| default_instrument_id_ == other.default_instrument_id_ &&
|
| default_address_id_ == other.default_address_id_ &&
|
| - required_actions_ == required_actions_;
|
| + required_actions_ == other.required_actions_;
|
| }
|
|
|
| bool WalletItems::operator!=(const WalletItems& other) const {
|
|
|