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

Unified Diff: chrome/browser/autofill/credit_card.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/auto_fill_editor_gtk.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/credit_card.cc
===================================================================
--- chrome/browser/autofill/credit_card.cc (revision 54340)
+++ chrome/browser/autofill/credit_card.cc (working copy)
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "base/basictypes.h"
#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_type.h"
@@ -438,7 +439,7 @@
if (expiration_month_ == 0)
return string16();
- string16 month = IntToString16(expiration_month_);
+ string16 month = base::IntToString16(expiration_month_);
if (expiration_month_ >= 10)
return month;
@@ -451,14 +452,14 @@
if (expiration_year_ == 0)
return string16();
- return IntToString16(Expiration4DigitYear());
+ return base::IntToString16(Expiration4DigitYear());
}
string16 CreditCard::Expiration2DigitYearAsString() const {
if (expiration_year_ == 0)
return string16();
- return IntToString16(Expiration2DigitYear());
+ return base::IntToString16(Expiration2DigitYear());
}
void CreditCard::SetExpirationMonthFromString(const string16& text) {
@@ -563,7 +564,7 @@
bool CreditCard::IsExpirationMonth(const string16& text) const {
int month;
- if (!StringToInt(text, &month))
+ if (!base::StringToInt(text, &month))
return false;
return expiration_month_ == month;
@@ -571,7 +572,7 @@
bool CreditCard::Is2DigitExpirationYear(const string16& text) const {
int year;
- if (!StringToInt(text, &year))
+ if (!base::StringToInt(text, &year))
return false;
return year < 100 && (expiration_year_ % 100) == year;
@@ -579,7 +580,7 @@
bool CreditCard::Is4DigitExpirationYear(const string16& text) const {
int year;
- if (!StringToInt(text, &year))
+ if (!base::StringToInt(text, &year))
return false;
return expiration_year_ == year;
@@ -587,7 +588,7 @@
bool CreditCard::ConvertDate(const string16& date, int* num) const {
if (!date.empty()) {
- bool converted = StringToInt(date, num);
+ bool converted = base::StringToInt(date, num);
DCHECK(converted);
if (!converted)
return false;
« no previous file with comments | « chrome/browser/autofill/auto_fill_editor_gtk.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698