Home | History | Annotate | Download | only in bookmarks

Lines Matching refs:term

27   // when we match only one term, and is filled in when we get more than one
28 // term. We can do this as when we have only one matching term we know
158 bool BookmarkIndex::GetBookmarksWithTitleMatchingTerm(const string16& term,
161 Index::const_iterator i = index_.lower_bound(term);
165 if (!QueryParser::IsWordLongEnoughForPrefixSearch(term)) {
166 // Term is too short for prefix match, compare using exact match.
167 if (i->first != term)
168 return false; // No bookmarks with this term.
178 // This is the first term and we're doing a prefix match. Loop through
179 // index adding all entries that start with term to matches.
181 i->first.size() >= term.size() &&
182 term.compare(0, term.size(), i->first, 0, term.size()) == 0) {
189 // Prefix match and not the first term. Loop through index combining
190 // current matches in matches with term, placing result in result.
193 i->first.size() >= term.size() &&
194 term.compare(0, term.size(), i->first, 0, term.size()) == 0) {
250 void BookmarkIndex::RegisterNode(const string16& term,
252 if (std::find(index_[term].begin(), index_[term].end(), node) !=
253 index_[term].end()) {
254 // We've already added node for term.
257 index_[term].insert(node);
260 void BookmarkIndex::UnregisterNode(const string16& term,
262 Index::iterator i = index_.find(term);
264 // We can get here if the node has the same term more than once. For