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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_types.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_types.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_types.cc b/chrome/browser/ui/autofill/autofill_dialog_types.cc
index b990097bfb0258218b1f9d9945265a39bb35817e..90af1480c8b22ab1b15614c8a42aabbd573304cd 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_types.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_types.cc
@@ -28,8 +28,9 @@ DialogNotification::DialogNotification(Type type,
display_text_(display_text),
checked_(false) {
// If there's a range separated by bars, mark that as the anchor text.
- std::vector<base::string16> pieces;
- base::SplitStringDontTrim(display_text, kRangeSeparator, &pieces);
+ std::vector<base::string16> pieces = base::SplitString(
+ display_text, base::string16(1, kRangeSeparator),
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
if (pieces.size() > 1) {
size_t start = pieces[0].size();
size_t end = start + pieces[1].size();

Powered by Google App Engine
This is Rietveld 408576698