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

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: fixes 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
« no previous file with comments | « components/proximity_auth/bluetooth_util_chromeos.cc ('k') | components/query_parser/snippet_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/query_parser/snippet.cc
diff --git a/components/query_parser/snippet.cc b/components/query_parser/snippet.cc
index e393d60ff089ea6280eb555fb4a74078061c4393..2276e4acc772eb2d2b9986799fff7cf1d2e92e1a 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::TRIM_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.
« no previous file with comments | « components/proximity_auth/bluetooth_util_chromeos.cc ('k') | components/query_parser/snippet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698