summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-21 14:37:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-21 21:38:12 +0000
commitc6f82b158f374c172a46326699f03d97777faa8e (patch)
treec96472fa185ca20b22fad773cd195689e4097894 /chrome/browser/ui/views
parentdb484c3eff68c46ddf1530dd60441dba4614cb5c (diff)
downloadchromium_src-c6f82b158f374c172a46326699f03d97777faa8e.zip
chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.gz
chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.bz2
Update SplitString calls in chrome.
In many places that iterated over the results, the code was changed to use a range-based for loop over the result of the SplitStirng call. Review URL: https://codereview.chromium.org/1240183002 Cr-Commit-Position: refs/heads/master@{#339753}
Diffstat (limited to 'chrome/browser/ui/views')
-rw-r--r--chrome/browser/ui/views/autofill/expanding_textfield.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/ui/views/autofill/expanding_textfield.cc b/chrome/browser/ui/views/autofill/expanding_textfield.cc
index 147742b..c7957d5 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();