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

Unified Diff: components/autofill/core/browser/credit_card.cc

Issue 296593003: Make various string_util functions take StringPieces instead of char[]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
Index: components/autofill/core/browser/credit_card.cc
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
index 295f6c1173e3e745b363a31f10de5e5486b5baf9..798a86661fb9dc785bab622e7871e11241ac0834 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -133,9 +133,8 @@ CreditCard::~CreditCard() {}
// static
const base::string16 CreditCard::StripSeparators(const base::string16& number) {
- const base::char16 kSeparators[] = {'-', ' ', '\0'};
base::string16 stripped;
- base::RemoveChars(number, kSeparators, &stripped);
+ base::RemoveChars(number, base::ASCIIToUTF16("- "), &stripped);
return stripped;
}

Powered by Google App Engine
This is Rietveld 408576698