OLD | NEW |
---|---|
(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 wallet { | |
11 | |
12 // Matches a subset of wallet proto values for required actions. Missing values | |
13 // are either deprecated or don't apply to Chrome's use of Online Wallet. | |
14 enum RequiredAction { | |
15 UNKNOWN_TYPE = 0, // Catch all type, not in proto. | |
16 SETUP_WALLET = 1, | |
17 ACCEPT_TOS = 2, | |
18 GAIA_AUTH = 4, | |
19 UPDATE_EXPIRATION_DATE = 7, | |
20 UPGRADE_MIN_ADDRESS = 8, | |
21 INVALID_FORM_FIELD = 11, | |
22 CVC_RISK_CHALLENGE = 12, | |
ahutter
2013/01/07 17:50:11
Since we're only getting the string representation
Dan Beam
2013/01/07 18:29:08
Done.
| |
23 }; | |
24 | |
25 // Static helper functions to determine if an RequiredAction applies to either a | |
26 // FullWallet or WalletItems. | |
27 bool ActionAppliesToFullWallet(RequiredAction action); | |
28 bool ActionAppliesToWalletItems(RequiredAction action); | |
29 | |
30 // Turn a string value of the parsed JSON response into an RequiredAction. | |
31 RequiredAction ParseRequiredActionFromString(const std::string& str); | |
32 | |
33 } // namespace wallet | |
34 | |
35 #endif // CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_ | |
OLD | NEW |