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

Unified Diff: chrome/browser/history/history_backend.h

Issue 8120004: HQP Refactoring (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_backend.h
===================================================================
--- chrome/browser/history/history_backend.h (revision 103712)
+++ chrome/browser/history/history_backend.h (working copy)
@@ -26,6 +26,7 @@
class BookmarkService;
struct DownloadPersistentStoreInfo;
+class Profile;
class TestingProfile;
struct ThumbnailScore;
@@ -103,7 +104,8 @@
// may be NULL.
//
// This constructor is fast and does no I/O, so can be called at any time.
- HistoryBackend(const FilePath& history_dir,
+ HistoryBackend(Profile* profile,
+ const FilePath& history_dir,
int id,
Delegate* delegate,
BookmarkService* bookmark_service);
@@ -112,9 +114,9 @@
// fails, all other functions will fail as well. (Since this runs on another
// thread, we don't bother returning failure.)
//
- // |languages| gives a list of language encodings with which the history
- // URLs and omnibox searches are interpreted.
- // |force_fail| can be set during unittests to unconditionally fail to init.
+ // |languages| gives the languages used to break search terms and history
+ // page titles into separate words. |force_fail| can be set during unittests
+ // to unconditionally fail to init.
void Init(const std::string& languages, bool force_fail);
// Notification that the history system is shutting down. This will break
@@ -256,6 +258,13 @@
const base::Time remove_end);
void RemoveDownloads(const base::Time remove_end);
+ // InMemoryURLIndex ----------------------------------------------------------
+
+ // Returns the quick history index.
+ history::InMemoryURLIndex* InMemoryIndex() const {
+ return in_memory_url_index_.get();
+ }
+
// Segment usage -------------------------------------------------------------
void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request,
@@ -541,6 +550,8 @@
// Data ----------------------------------------------------------------------
+ Profile* profile_; // The profile may be NULL during unittests.
Peter Kasting 2011/10/05 00:11:42 Where do you use this?
mrossetti 2011/10/07 17:04:14 Only for initializing the InMemoryURLIndex instanc
+
// Delegate. See the class definition above for more information. This will
// be NULL before Init is called and after Cleanup, but is guaranteed
// non-NULL in between.
@@ -567,6 +578,9 @@
// created.
scoped_ptr<TextDatabaseManager> text_database_;
+ // The index used for quick history lookups.
+ scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
+
// Manages expiration between the various databases.
ExpireHistoryBackend expirer_;

Powered by Google App Engine
This is Rietveld 408576698