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

Unified Diff: chrome/browser/ui/views/autofill/expanding_textfield.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/views/autofill/expanding_textfield.cc
diff --git a/chrome/browser/ui/views/autofill/expanding_textfield.cc b/chrome/browser/ui/views/autofill/expanding_textfield.cc
index 147742b91f27fd6ee0219e95750e91d4ce860f88..c7957d58fea68fff5752bf651e401d49870c6363 100644
--- a/chrome/browser/ui/views/autofill/expanding_textfield.cc
+++ b/chrome/browser/ui/views/autofill/expanding_textfield.cc
@@ -50,8 +50,9 @@ ExpandingTextfield::~ExpandingTextfield() {}
void ExpandingTextfield::SetText(const base::string16& text) {
textfields_.front()->SetText(text);
- std::vector<base::string16> strings;
- base::SplitStringDontTrim(text, '\n', &strings);
+ std::vector<base::string16> strings = base::SplitString(
+ text, base::string16(1, '\n'),
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
size_t i = 0;
for (std::list<DecoratedTextfield*>::iterator iter = textfields_.begin();

Powered by Google App Engine
This is Rietveld 408576698