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

Side by Side Diff: components/autofill/browser/wallet/instrument.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/wallet/instrument.h" 5 #include "components/autofill/browser/wallet/instrument.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/autofill/validation.h" 11 #include "components/autofill/browser/validation.h"
12 #include "chrome/browser/autofill/wallet/wallet_address.h" 12 #include "components/autofill/browser/wallet/wallet_address.h"
13 13
14 namespace autofill { 14 namespace autofill {
15 namespace wallet { 15 namespace wallet {
16 16
17 namespace { 17 namespace {
18 18
19 std::string FormOfPaymentToString(Instrument::FormOfPayment form_of_payment) { 19 std::string FormOfPaymentToString(Instrument::FormOfPayment form_of_payment) {
20 switch (form_of_payment) { 20 switch (form_of_payment) {
21 case Instrument::UNKNOWN: 21 case Instrument::UNKNOWN:
22 return "UNKNOWN"; 22 return "UNKNOWN";
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool exp_year_valid = expiration_year_ >= 2013 && expiration_year_ <= 2100; 87 bool exp_year_valid = expiration_year_ >= 2013 && expiration_year_ <= 2100;
88 88
89 return primary_account_number_valid && 89 return primary_account_number_valid &&
90 card_verification_number_valid && 90 card_verification_number_valid &&
91 exp_month_valid && 91 exp_month_valid &&
92 exp_year_valid; 92 exp_year_valid;
93 } 93 }
94 94
95 } // namespace wallet 95 } // namespace wallet
96 } // namespace autofill 96 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698