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

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

Issue 11757004: Omnibox: Add Mid-Input Matching to HistoryQuick Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually put users in the experiment group 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 #ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 5 #ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
6 #define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 6 #define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
7 7
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void Init(); 111 void Init();
112 112
113 // Signals that any outstanding initialization should be canceled and 113 // Signals that any outstanding initialization should be canceled and
114 // flushes the cache to disk. 114 // flushes the cache to disk.
115 void ShutDown(); 115 void ShutDown();
116 116
117 // Scans the history index and returns a vector with all scored, matching 117 // Scans the history index and returns a vector with all scored, matching
118 // history items. This entry point simply forwards the call on to the 118 // history items. This entry point simply forwards the call on to the
119 // URLIndexPrivateData class. For a complete description of this function 119 // URLIndexPrivateData class. For a complete description of this function
120 // refer to that class. 120 // refer to that class.
121 ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string); 121 ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string,
122 size_t cursor_position);
sky 2013/02/06 04:59:43 Document what string16::npos means.
Mark P 2013/02/06 17:53:34 Done.
122 123
123 // Deletes the index entry, if any, for the given |url|. 124 // Deletes the index entry, if any, for the given |url|.
124 void DeleteURL(const GURL& url); 125 void DeleteURL(const GURL& url);
125 126
126 // Sets the optional observers for completion of restoral and saving of the 127 // Sets the optional observers for completion of restoral and saving of the
127 // index's private data. 128 // index's private data.
128 void set_restore_cache_observer( 129 void set_restore_cache_observer(
129 RestoreCacheObserver* restore_cache_observer) { 130 RestoreCacheObserver* restore_cache_observer) {
130 restore_cache_observer_ = restore_cache_observer; 131 restore_cache_observer_ = restore_cache_observer;
131 } 132 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // TODO(mrossetti): Eliminate once the transition to SQLite has been done. 285 // TODO(mrossetti): Eliminate once the transition to SQLite has been done.
285 // http://crbug.com/83659 286 // http://crbug.com/83659
286 bool needs_to_be_cached_; 287 bool needs_to_be_cached_;
287 288
288 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex); 289 DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex);
289 }; 290 };
290 291
291 } // namespace history 292 } // namespace history
292 293
293 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_ 294 #endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698