Index: chrome/browser/autofill/wallet/required_action.h |
diff --git a/chrome/browser/autofill/wallet/required_action.h b/chrome/browser/autofill/wallet/required_action.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9057c5e32173f204493f855b187710964f63d136 |
--- /dev/null |
+++ b/chrome/browser/autofill/wallet/required_action.h |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_ |
+#define CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_ |
+ |
+#include <string> |
+ |
+namespace wallet { |
+ |
+// Matches wallet proto values. |
+enum RequiredAction { |
+ UNKNOWN_TYPE = 0, // Catch all type, not in proto. |
+ SETUP_WALLET = 1, |
+ ACCEPT_TOS = 2, |
+ GAIA_AUTH = 4, |
+ UPDATE_EXPIRATION_DATE = 7, |
+ UPGRADE_MIN_ADDRESS = 8, |
+ INVALID_FORM_FIELD = 11, |
+ 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.
|
+}; |
+ |
+// Static helper functions to determine if an RequiredAction applies to either a |
+// FullWallet or WalletItems. |
+bool AppliesToFullWallet(RequiredAction action); |
+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.
|
+ |
+// Turn a string value of the parsed JSON response into an RequiredAction. |
+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.
|
+ |
+} // namespace wallet |
+ |
+#endif // CHROME_BROWSER_AUTOFILL_WALLET_REQUIRED_ACTION_H_ |