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

Side by Side Diff: chrome/browser/history/url_index_private_data.cc

Issue 11757004: Omnibox: Add Mid-Input Matching to HistoryQuick Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/url_index_private_data.h" 5 #include "chrome/browser/history/url_index_private_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 #include <limits> 10 #include <limits>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 URLIndexPrivateData::URLIndexPrivateData() 71 URLIndexPrivateData::URLIndexPrivateData()
72 : restored_cache_version_(0), 72 : restored_cache_version_(0),
73 saved_cache_version_(kCurrentCacheFileVersion), 73 saved_cache_version_(kCurrentCacheFileVersion),
74 pre_filter_item_count_(0), 74 pre_filter_item_count_(0),
75 post_filter_item_count_(0), 75 post_filter_item_count_(0),
76 post_scoring_item_count_(0) { 76 post_scoring_item_count_(0) {
77 } 77 }
78 78
79 ScoredHistoryMatches URLIndexPrivateData::HistoryItemsForTerms( 79 ScoredHistoryMatches URLIndexPrivateData::HistoryItemsForTerms(
80 const string16& search_string, 80 const string16& search_string,
81 const size_t cursor_position,
Peter Kasting 2013/01/04 20:04:32 Doesn't match header prototype (and again, const v
Mark P 2013/01/04 23:38:58 Done.
81 BookmarkService* bookmark_service) { 82 BookmarkService* bookmark_service) {
82 pre_filter_item_count_ = 0; 83 pre_filter_item_count_ = 0;
83 post_filter_item_count_ = 0; 84 post_filter_item_count_ = 0;
84 post_scoring_item_count_ = 0; 85 post_scoring_item_count_ = 0;
85 // The search string we receive may contain escaped characters. For reducing 86 // The search string we receive may contain escaped characters. For reducing
86 // the index we need individual, lower-cased words, ignoring escapings. For 87 // the index we need individual, lower-cased words, ignoring escapings. For
87 // the final filtering we need whitespace separated substrings possibly 88 // the final filtering we need whitespace separated substrings possibly
88 // containing escaped characters. 89 // containing escaped characters.
89 string16 lower_raw_string(base::i18n::ToLower(search_string)); 90 string16 lower_raw_string(base::i18n::ToLower(search_string));
90 string16 lower_unescaped_string = 91 string16 lower_unescaped_string =
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 } 1154 }
1154 1155
1155 // static 1156 // static
1156 bool URLIndexPrivateData::URLSchemeIsWhitelisted( 1157 bool URLIndexPrivateData::URLSchemeIsWhitelisted(
1157 const GURL& gurl, 1158 const GURL& gurl,
1158 const std::set<std::string>& whitelist) { 1159 const std::set<std::string>& whitelist) {
1159 return whitelist.find(gurl.scheme()) != whitelist.end(); 1160 return whitelist.find(gurl.scheme()) != whitelist.end();
1160 } 1161 }
1161 1162
1162 } // namespace history 1163 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698