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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index d700e8b88ef5599da0f86dee710ff25d7293e586..326278f9dba5139e56ff51613d6d20e0e7253789 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -295,11 +295,9 @@ const wallet::Address* FindDuplicateAddress(
}
bool IsCardHolderNameValidForWallet(const base::string16& name) {
- base::string16 whitespace_collapsed_name =
- base::CollapseWhitespace(name, true);
- std::vector<base::string16> split_name;
- base::SplitString(whitespace_collapsed_name, ' ', &split_name);
- return split_name.size() >= 2;
+ return base::SplitStringPiece(name, base::string16(1, ' '),
+ base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY).size() >= 2;
}
DialogSection SectionFromLocation(wallet::FormFieldError::Location location) {
« no previous file with comments | « chrome/browser/ui/android/autofill/autofill_dialog_result.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698