Index: chrome/browser/history/query_parser.cc |
diff --git a/chrome/browser/history/query_parser.cc b/chrome/browser/history/query_parser.cc |
index 457a6fb7d0c1e336a000a06c345ddd8b4912e54c..0a77ff0720a2ae99aa526eab63d7f74cd536fb14 100644 |
--- a/chrome/browser/history/query_parser.cc |
+++ b/chrome/browser/history/query_parser.cc |
@@ -45,16 +45,6 @@ void CoalesceMatchesFrom(size_t index, Snippet::MatchPositions* matches) { |
} |
} |
-// Sorts the match positions in |matches| by their first index, then coalesces |
-// any match positions that intersect each other. |
-void CoalseAndSortMatchPositions(Snippet::MatchPositions* matches) { |
- std::sort(matches->begin(), matches->end(), &CompareMatchPosition); |
- // WARNING: we don't use iterator here as CoalesceMatchesFrom may remove |
- // from matches. |
- for (size_t i = 0; i < matches->size(); ++i) |
- CoalesceMatchesFrom(i, matches); |
-} |
- |
// Returns true if the character is considered a quote. |
bool IsQueryQuote(wchar_t ch) { |
return ch == '"' || |
@@ -467,7 +457,17 @@ void QueryParser::ExtractQueryWords(const base::string16& text, |
words->push_back(QueryWord()); |
words->back().word = word; |
words->back().position = iter.prev(); |
- } |
+ } |
} |
} |
} |
+ |
+// static |
+void QueryParser::CoalseAndSortMatchPositions( |
+ Snippet::MatchPositions* matches) { |
+ std::sort(matches->begin(), matches->end(), &CompareMatchPosition); |
+ // WARNING: we don't use iterator here as CoalesceMatchesFrom may remove |
+ // from matches. |
+ for (size_t i = 0; i < matches->size(); ++i) |
+ CoalesceMatchesFrom(i, matches); |
+} |