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

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

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 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_REQUIRED_ACTION_H_
6 #define CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_
7
8 #include <string>
9
10 namespace autofill {
11 namespace wallet {
12
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
17 // backing card.
18 enum RequiredAction {
19 UNKNOWN_TYPE = 0, // Catch all type.
20 CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS,
21 SETUP_WALLET,
22 ACCEPT_TOS,
23 GAIA_AUTH,
24 UPDATE_EXPIRATION_DATE,
25 UPGRADE_MIN_ADDRESS,
26 INVALID_FORM_FIELD,
27 VERIFY_CVV,
28 PASSIVE_GAIA_AUTH,
29 REQUIRE_PHONE_NUMBER,
30 };
31
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);
37
38 // Turn a string value of the parsed JSON response into an RequiredAction.
39 RequiredAction ParseRequiredActionFromString(const std::string& str);
40
41 } // namespace wallet
42 } // namespace autofill
43
44 #endif // CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/wallet/instrument_unittest.cc ('k') | chrome/browser/autofill/wallet/required_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698