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

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

Issue 9030031: Move InMemoryURLIndex Caching Operations to FILE Thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Missed a private data swap. Try to fix update phase failure. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_backend.h
===================================================================
--- chrome/browser/history/history_backend.h (revision 117518)
+++ chrome/browser/history/history_backend.h (working copy)
@@ -12,6 +12,7 @@
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/mru_cache.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/archived_database.h"
@@ -19,6 +20,7 @@
#include "chrome/browser/history/history_database.h"
#include "chrome/browser/history/history_marshaling.h"
#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/history/in_memory_url_index.h"
#include "chrome/browser/history/text_database_manager.h"
#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/browser/history/visit_tracker.h"
@@ -27,6 +29,7 @@
class BookmarkService;
struct DownloadPersistentStoreInfo;
+class Profile;
class TestingProfile;
struct ThumbnailScore;
@@ -104,7 +107,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);
@@ -259,6 +263,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,
@@ -583,6 +594,9 @@
// created.
scoped_ptr<TextDatabaseManager> text_database_;
+ // The index used for quick history lookups.
+ scoped_refptr<history::InMemoryURLIndex> in_memory_url_index_;
+
// Manages expiration between the various databases.
ExpireHistoryBackend expirer_;

Powered by Google App Engine
This is Rietveld 408576698