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

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

Issue 296743009: Pass AutocompleteProvider::kMaxMatches to InMemoryURLIndex (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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
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/in_memory_url_index.h" 5 #include "chrome/browser/history/in_memory_url_index.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 if (history_dir_.empty()) 153 if (history_dir_.empty())
154 return false; 154 return false;
155 *file_path = history_dir_.Append(FILE_PATH_LITERAL("History Provider Cache")); 155 *file_path = history_dir_.Append(FILE_PATH_LITERAL("History Provider Cache"));
156 return true; 156 return true;
157 } 157 }
158 158
159 // Querying -------------------------------------------------------------------- 159 // Querying --------------------------------------------------------------------
160 160
161 ScoredHistoryMatches InMemoryURLIndex::HistoryItemsForTerms( 161 ScoredHistoryMatches InMemoryURLIndex::HistoryItemsForTerms(
162 const base::string16& term_string, 162 const base::string16& term_string,
163 size_t cursor_position) { 163 size_t cursor_position,
164 size_t max_matches) {
164 return private_data_->HistoryItemsForTerms( 165 return private_data_->HistoryItemsForTerms(
165 term_string, 166 term_string,
166 cursor_position, 167 cursor_position,
168 max_matches,
167 languages_, 169 languages_,
168 BookmarkModelFactory::GetForProfile(profile_)); 170 BookmarkModelFactory::GetForProfile(profile_));
169 } 171 }
170 172
171 // Updating -------------------------------------------------------------------- 173 // Updating --------------------------------------------------------------------
172 174
173 void InMemoryURLIndex::DeleteURL(const GURL& url) { 175 void InMemoryURLIndex::DeleteURL(const GURL& url) {
174 private_data_->DeleteURL(url); 176 private_data_->DeleteURL(url);
175 } 177 }
176 178
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 base::Bind(DeleteCacheFile, path)); 340 base::Bind(DeleteCacheFile, path));
339 } 341 }
340 } 342 }
341 343
342 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { 344 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) {
343 if (save_cache_observer_) 345 if (save_cache_observer_)
344 save_cache_observer_->OnCacheSaveFinished(succeeded); 346 save_cache_observer_->OnCacheSaveFinished(succeeded);
345 } 347 }
346 348
347 } // namespace history 349 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/in_memory_url_index.h ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698