Lines Matching defs:snippet
5 #include "chrome/browser/history/snippet.h"
82 bool ComparePair1st(const Snippet::MatchPosition& a,
83 const Snippet::MatchPosition& b) {
88 // sqlite's FTS matching. BuildSnippet returns the snippet for matching
104 Snippet::MatchPositions match_positions;
118 // Compute the snippet.
119 Snippet snippet;
120 snippet.ComputeSnippet(match_positions, document);
122 // Now "highlight" all matches in the snippet with **.
124 Snippet::MatchPositions::const_iterator match;
126 for (match = snippet.matches().begin();
127 match != snippet.matches().end(); ++match) {
128 star_snippet += snippet.text().substr(pos, match->first - pos);
130 star_snippet += snippet.text().substr(match->first,
135 star_snippet += snippet.text().substr(pos);
158 // one that gets the "TM" in its snippet.
171 // the 2nd match added, the snippet goes over the size limit so that
172 // the snippet ends right before the 3rd match.
244 Snippet::MatchPositions matches;
245 Snippet::ExtractMatchPositions(data[i].offsets_string, "0", &matches);