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 wallet proto values. | |
13 enum RequiredAction { | |
14 UNKNOWN_TYPE = 0, // Catch all type, not in proto. | |
15 SETUP_WALLET = 1, | |
16 ACCEPT_TOS = 2, | |
17 GAIA_AUTH = 4, | |
18 UPDATE_EXPIRATION_DATE = 7, | |
19 UPGRADE_MIN_ADDRESS = 8, | |
20 INVALID_FORM_FIELD = 11, | |
21 CVC_RISK_CHALLENGE = 12, | |
Ilya Sherman
2013/01/05 23:30:49
Why are 3, 5, 6, 9, and 10 missing? Please includ
Dan Beam
2013/01/07 15:44:53
Done.
| |
22 }; | |
23 | |
24 // Static helper functions to determine if an RequiredAction applies to either a | |
25 // FullWallet or WalletItems. | |
26 bool AppliesToFullWallet(RequiredAction action); | |
27 bool AppliesToWalletItems(RequiredAction action); | |
Ilya Sherman
2013/01/05 23:30:49
nit: Please name these something more like "Action
Dan Beam
2013/01/07 15:44:53
Done.
| |
28 | |
29 // Turn a string value of the parsed JSON response into an RequiredAction. | |
30 RequiredAction ParseFromString(const std::string& str); | |
Ilya Sherman
2013/01/05 23:30:49
nit: Please name this something more like "ParseRe
Dan Beam
2013/01/07 15:44:53
Done.
| |
31 | |
32 } // namespace wallet | |
33 | |
34 #endif // CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_ | |
OLD | NEW |