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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 1234973004: Update SplitString calls in components (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: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index ef46edbed91879b07548404ab331fe10205638ef..7cfbec3c7a2ee2c553a8dea94fcd0bf3ed3cf2ef 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -485,10 +485,9 @@ void AutofillAgent::AcceptDataListSuggestion(
// If this element takes multiple values then replace the last part with
// the suggestion.
if (input_element->isMultiple() && input_element->isEmailField()) {
- std::vector<base::string16> parts;
-
- base::SplitStringDontTrim(
- base::StringPiece16(input_element->editingValue()), ',', &parts);
+ std::vector<base::string16> parts = base::SplitString(
+ base::StringPiece16(input_element->editingValue()),
+ base::ASCIIToUTF16(","), base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
if (parts.size() == 0)
parts.push_back(base::string16());

Powered by Google App Engine
This is Rietveld 408576698