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

Unified Diff: components/query_parser/snippet.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/query_parser/snippet.cc
diff --git a/components/query_parser/snippet.cc b/components/query_parser/snippet.cc
index e393d60ff089ea6280eb555fb4a74078061c4393..aeb05f7dc6bdad6d405cce7d89ffa85e7bd092f3 100644
--- a/components/query_parser/snippet.cc
+++ b/components/query_parser/snippet.cc
@@ -167,8 +167,8 @@ void Snippet::ExtractMatchPositions(const std::string& offsets_str,
DCHECK(match_positions);
if (offsets_str.empty())
return;
- std::vector<std::string> offsets;
- base::SplitString(offsets_str, ' ', &offsets);
+ std::vector<std::string> offsets = base::SplitString(
+ offsets_str, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
// SQLite offsets are sets of four integers:
// column, query term, match offset, match length
// Matches within a string are marked by (start, end) pairs.

Powered by Google App Engine
This is Rietveld 408576698