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

Unified Diff: chrome/browser/autofill/wallet/required_action.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/wallet/required_action.h ('k') | chrome/browser/autofill/wallet/wallet_address.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/wallet/required_action.cc
diff --git a/chrome/browser/autofill/wallet/required_action.cc b/chrome/browser/autofill/wallet/required_action.cc
deleted file mode 100644
index 465d97ffc0cebf36a753078c9375f99221c586ff..0000000000000000000000000000000000000000
--- a/chrome/browser/autofill/wallet/required_action.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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.
-
-#include "chrome/browser/autofill/wallet/required_action.h"
-
-#include "base/logging.h"
-#include "base/string_util.h"
-
-namespace autofill {
-namespace wallet {
-
-bool ActionAppliesToFullWallet(RequiredAction action) {
- return action == UPDATE_EXPIRATION_DATE ||
- action == VERIFY_CVV ||
- action == CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS ||
- action == REQUIRE_PHONE_NUMBER;
-}
-
-bool ActionAppliesToSaveToWallet(RequiredAction action) {
- return action == INVALID_FORM_FIELD ||
- action == REQUIRE_PHONE_NUMBER;
-}
-
-bool ActionAppliesToWalletItems(RequiredAction action) {
- return action == SETUP_WALLET ||
- action == ACCEPT_TOS ||
- action == GAIA_AUTH ||
- action == REQUIRE_PHONE_NUMBER ||
- action == UPDATE_EXPIRATION_DATE ||
- action == UPGRADE_MIN_ADDRESS ||
- action == PASSIVE_GAIA_AUTH;
-}
-
-RequiredAction ParseRequiredActionFromString(const std::string& str) {
- std::string str_lower;
- TrimWhitespaceASCII(StringToLowerASCII(str), TRIM_ALL, &str_lower);
-
- if (str_lower == "setup_wallet")
- return SETUP_WALLET;
- else if (str_lower == "accept_tos")
- return ACCEPT_TOS;
- else if (str_lower == "gaia_auth")
- return GAIA_AUTH;
- else if (str_lower == "update_expiration_date")
- return UPDATE_EXPIRATION_DATE;
- else if (str_lower == "upgrade_min_address")
- return UPGRADE_MIN_ADDRESS;
- else if (str_lower == "invalid_form_field")
- return INVALID_FORM_FIELD;
- else if (str_lower == "verify_cvv")
- return VERIFY_CVV;
- else if (str_lower == "passive_gaia_auth")
- return PASSIVE_GAIA_AUTH;
- else if (str_lower == "require_phone_number")
- return REQUIRE_PHONE_NUMBER;
- else if (str_lower == "choose_another_instrument_or_address")
- return CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS;
-
- DLOG(ERROR) << "Failed to parse: \"" << str << "\" as a required action";
- return UNKNOWN_TYPE;
-}
-
-} // namespace wallet
-} // namespace autofill
« no previous file with comments | « chrome/browser/autofill/wallet/required_action.h ('k') | chrome/browser/autofill/wallet/wallet_address.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698