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

Unified Diff: chrome/browser/history/history.cc

Issue 8291005: HQP Refactoring (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rattle those Bots Senseless 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
« no previous file with comments | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history.cc
===================================================================
--- chrome/browser/history/history.cc (revision 105497)
+++ chrome/browser/history/history.cc (working copy)
@@ -37,6 +37,7 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_database.h"
#include "chrome/browser/history/in_memory_history_backend.h"
+#include "chrome/browser/history/in_memory_url_index.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -182,6 +183,9 @@
// Get rid of the in-memory backend.
in_memory_backend_.reset();
+ // Give the InMemoryURLIndex a chance to shutdown.
+ InMemoryIndex()->ShutDown();
+
// The backend's destructor must run on the history thread since it is not
// threadsafe. So this thread must not be the last thread holding a reference
// to the backend, or a crash could happen.
@@ -249,8 +253,8 @@
// LoadBackendIfNecessary() here even though it won't affect the return value
// for this call.
LoadBackendIfNecessary();
- if (in_memory_backend_.get())
- return in_memory_backend_->InMemoryIndex();
+ if (history_backend_.get())
+ return history_backend_->InMemoryIndex();
return NULL;
}
@@ -803,7 +807,8 @@
++current_backend_id_;
scoped_refptr<HistoryBackend> backend(
- new HistoryBackend(history_dir_,
+ new HistoryBackend(profile_,
+ history_dir_,
current_backend_id_,
new BackendDelegate(this, profile_),
bookmark_service_));
« no previous file with comments | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698