diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 22:34:29 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 22:34:29 +0000 |
commit | 0850fa6b9e60e7b925ba516d8cf563fcb18eb23a (patch) | |
tree | b269d0c9180761ab39a046ebda1e34355d78c9ab /chrome/browser/bookmarks | |
parent | 0b081d53f118869541d28139353457bd7aec32e5 (diff) | |
download | chromium_src-0850fa6b9e60e7b925ba516d8cf563fcb18eb23a.zip chromium_src-0850fa6b9e60e7b925ba516d8cf563fcb18eb23a.tar.gz chromium_src-0850fa6b9e60e7b925ba516d8cf563fcb18eb23a.tar.bz2 |
Add the ability to unload the HistoryBackend.
A small number of places used accessors like in_memory_url_database() or backend_loaded() with the expectation that if they weren't already functional, the history system was in the process of making them so. I elected to make both of these functions that triggered lazy backend initialization.
BUG=23400
TEST=none
Review URL: http://codereview.chromium.org/267019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_index.cc | 2 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_index_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_storage.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/bookmarks/bookmark_index.cc b/chrome/browser/bookmarks/bookmark_index.cc index 8245ac1..18c3134 100644 --- a/chrome/browser/bookmarks/bookmark_index.cc +++ b/chrome/browser/bookmarks/bookmark_index.cc @@ -80,7 +80,7 @@ void BookmarkIndex::SortMatches(const Matches& matches, profile_->GetHistoryService(Profile::EXPLICIT_ACCESS) : NULL; history::URLDatabase* url_db = history_service ? - history_service->in_memory_database() : NULL; + history_service->InMemoryDatabase() : NULL; for (Matches::const_iterator i = matches.begin(); i != matches.end(); ++i) ExtractBookmarkNodePairs(url_db, *i, node_typed_counts); diff --git a/chrome/browser/bookmarks/bookmark_index_unittest.cc b/chrome/browser/bookmarks/bookmark_index_unittest.cc index edac8b0..102a734 100644 --- a/chrome/browser/bookmarks/bookmark_index_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_index_unittest.cc @@ -224,7 +224,7 @@ TEST_F(BookmarkIndexTest, GetResultsSortedByTypedCount) { HistoryService* const history_service = profile.GetHistoryService(Profile::EXPLICIT_ACCESS); - history::URLDatabase* url_db = history_service->in_memory_database(); + history::URLDatabase* url_db = history_service->InMemoryDatabase(); struct TestData { const GURL url; diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc index d7dbe19..a187921 100644 --- a/chrome/browser/bookmarks/bookmark_storage.cc +++ b/chrome/browser/bookmarks/bookmark_storage.cc @@ -177,7 +177,7 @@ void BookmarkStorage::MigrateFromHistory() { model_->DoneLoading(details_.release()); return; } - if (!history->backend_loaded()) { + if (!history->BackendLoaded()) { // The backend isn't finished loading. Wait for it. notification_registrar_.Add(this, NotificationType::HISTORY_LOADED, Source<Profile>(profile_)); |