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

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

Issue 11757004: Omnibox: Add Mid-Input Matching to HistoryQuick Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo in comment Created 7 years, 10 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/in_memory_url_index.h" 5 #include "chrome/browser/history/in_memory_url_index.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/api/bookmarks/bookmark_service.h" 9 #include "chrome/browser/api/bookmarks/bookmark_service.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool InMemoryURLIndex::GetCacheFilePath(FilePath* file_path) { 150 bool InMemoryURLIndex::GetCacheFilePath(FilePath* file_path) {
151 if (history_dir_.empty()) 151 if (history_dir_.empty())
152 return false; 152 return false;
153 *file_path = history_dir_.Append(FILE_PATH_LITERAL("History Provider Cache")); 153 *file_path = history_dir_.Append(FILE_PATH_LITERAL("History Provider Cache"));
154 return true; 154 return true;
155 } 155 }
156 156
157 // Querying -------------------------------------------------------------------- 157 // Querying --------------------------------------------------------------------
158 158
159 ScoredHistoryMatches InMemoryURLIndex::HistoryItemsForTerms( 159 ScoredHistoryMatches InMemoryURLIndex::HistoryItemsForTerms(
160 const string16& term_string) { 160 const string16& term_string,
161 size_t cursor_position) {
161 return private_data_->HistoryItemsForTerms( 162 return private_data_->HistoryItemsForTerms(
162 term_string, BookmarkModelFactory::GetForProfile(profile_)); 163 term_string,
164 cursor_position,
165 BookmarkModelFactory::GetForProfile(profile_));
163 } 166 }
164 167
165 // Updating -------------------------------------------------------------------- 168 // Updating --------------------------------------------------------------------
166 169
167 void InMemoryURLIndex::DeleteURL(const GURL& url) { 170 void InMemoryURLIndex::DeleteURL(const GURL& url) {
168 private_data_->DeleteURL(url); 171 private_data_->DeleteURL(url);
169 } 172 }
170 173
171 void InMemoryURLIndex::Observe(int notification_type, 174 void InMemoryURLIndex::Observe(int notification_type,
172 const content::NotificationSource& source, 175 const content::NotificationSource& source,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 base::Bind(DeleteCacheFile, path)); 331 base::Bind(DeleteCacheFile, path));
329 } 332 }
330 } 333 }
331 334
332 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { 335 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) {
333 if (save_cache_observer_) 336 if (save_cache_observer_)
334 save_cache_observer_->OnCacheSaveFinished(succeeded); 337 save_cache_observer_->OnCacheSaveFinished(succeeded);
335 } 338 }
336 339
337 } // namespace history 340 } // 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