Chromium Code Reviews| Index: chrome/browser/autocomplete_history_manager.cc |
| diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc |
| index 84b411960c3595c27ad40092c19b988b119f7b4a..8543d57f004096b68bd5a47bcc1447562b310874 100644 |
| --- a/chrome/browser/autocomplete_history_manager.cc |
| +++ b/chrome/browser/autocomplete_history_manager.cc |
| @@ -19,6 +19,7 @@ |
| #include "content/browser/tab_contents/tab_contents.h" |
| #include "webkit/glue/form_data.h" |
| +using base::StringPiece16; |
| using webkit_glue::FormData; |
| using webkit_glue::FormField; |
| @@ -63,8 +64,8 @@ bool IsSSN(const string16& text) { |
| return false; |
| int area; |
| - if (!base::StringToInt(number_string.begin(), |
| - number_string.begin() + 3, |
| + if (!base::StringToInt(StringPiece16(number_string.begin(), |
| + number_string.begin() + 3), |
| &area)) |
|
erikwright (departed)
2011/12/14 05:29:57
Sorry, missed this one last time too.
Can you fix
|
| return false; |
| if (area < 1 || |
| @@ -73,15 +74,17 @@ bool IsSSN(const string16& text) { |
| return false; |
| int group; |
| - if (!base::StringToInt(number_string.begin() + 3, |
| - number_string.begin() + 5, |
| - &group) || group == 0) |
| + if (!base::StringToInt(StringPiece16(number_string.begin() + 3, |
| + number_string.begin() + 5), |
| + &group) |
| + || group == 0) |
| return false; |
| int serial; |
| - if (!base::StringToInt(number_string.begin() + 5, |
| - number_string.begin() + 9, |
| - &serial) || serial == 0) |
| + if (!base::StringToInt(StringPiece16(number_string.begin() + 5, |
| + number_string.begin() + 9), |
| + &serial) |
| + || serial == 0) |
| return false; |
| return true; |