Index: chrome/browser/history/history_backend.cc |
=================================================================== |
--- chrome/browser/history/history_backend.cc (revision 117518) |
+++ chrome/browser/history/history_backend.cc (working copy) |
@@ -27,8 +27,10 @@ |
#include "chrome/browser/history/in_memory_history_backend.h" |
#include "chrome/browser/history/page_usage_data.h" |
#include "chrome/browser/history/top_sites.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/url_constants.h" |
#include "content/browser/download/download_persistent_store_info.h" |
#include "googleurl/src/gurl.h" |
@@ -200,7 +202,8 @@ |
// HistoryBackend -------------------------------------------------------------- |
-HistoryBackend::HistoryBackend(const FilePath& history_dir, |
+HistoryBackend::HistoryBackend(Profile* profile, |
+ const FilePath& history_dir, |
int id, |
Delegate* delegate, |
BookmarkService* bookmark_service) |
@@ -212,6 +215,9 @@ |
backend_destroy_message_loop_(NULL), |
segment_queried_(false), |
bookmark_service_(bookmark_service) { |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableHistoryQuickProvider)) |
+ in_memory_url_index_ = new InMemoryURLIndex(profile, history_dir_); |
} |
HistoryBackend::~HistoryBackend() { |
@@ -649,6 +655,9 @@ |
archived_db_.reset(); |
} |
+ if (in_memory_url_index_.get()) |
+ in_memory_url_index_->Init(languages); |
+ |
// Tell the expiration module about all the nice databases we made. This must |
// happen before db_->Init() is called since the callback ForceArchiveHistory |
// may need to expire stuff. |