1 // Copyright 2013 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.
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_REQUIRED_ACTION_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_REQUIRED_ACTION_H_
13 // Required actions are steps that must be taken before the current transaction
14 // can proceed. Examples of this is include accepting the Terms of Service to
15 // use Google Wallet (happens on first use or when the ToS are updated) or
16 // typing a CVC when it's necessary verify the current user has access to the
19 UNKNOWN_TYPE
= 0, // Catch all type.
20 CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS
,
24 UPDATE_EXPIRATION_DATE
,
32 // Static helper functions to determine if an RequiredAction applies to a
33 // FullWallet, WalletItems, or SaveToWallet response.
34 bool ActionAppliesToFullWallet(RequiredAction action
);
35 bool ActionAppliesToSaveToWallet(RequiredAction action
);
36 bool ActionAppliesToWalletItems(RequiredAction action
);
38 // Turn a string value of the parsed JSON response into an RequiredAction.
39 RequiredAction
ParseRequiredActionFromString(const std::string
& str
);
42 } // namespace autofill
44 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_REQUIRED_ACTION_H_