diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 03:27:46 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 03:27:46 +0000 |
commit | 90ef1313cb672e7da91312c4f7d3cdee41c7a767 (patch) | |
tree | b42df35c8c71ca921bf7900beb537a1773debacf /chrome/browser/profile.cc | |
parent | 7459794d5e6251014e322a4042d68c4f3f19a5f3 (diff) | |
download | chromium_src-90ef1313cb672e7da91312c4f7d3cdee41c7a767.zip chromium_src-90ef1313cb672e7da91312c4f7d3cdee41c7a767.tar.gz chromium_src-90ef1313cb672e7da91312c4f7d3cdee41c7a767.tar.bz2 |
Makes deleting history no longer delete starred urls. Thiseffectively reenables the code in ExpireHistoryBackend. I also madethe code consistent so that when we delete visits as the result ofhistory deletion we don't change the typed/visit count of theunderlying url.BUG=1214201 1256202TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index e974e2a..9a64b40 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -617,6 +617,14 @@ ProfileImpl::~ProfileImpl() { request_context_ = NULL; } + // HistoryService may call into the BookmarkBarModel, as such we need to + // delete HistoryService before the BookmarkBarModel. The destructor for + // HistoryService will join with HistoryService's backend thread so that + // by the time the destructor has finished we're sure it will no longer call + // into the BookmarkBarModel. + history_service_ = NULL; + bookmark_bar_model_.reset(); + MarkAsCleanShutdown(); } @@ -721,11 +729,11 @@ URLRequestContext* ProfileImpl::GetRequestContext() { HistoryService* ProfileImpl::GetHistoryService(ServiceAccessType sat) { if (!history_service_created_) { + history_service_created_ = true; scoped_refptr<HistoryService> history(new HistoryService(this)); - if (!history->Init(GetPath())) + if (!history->Init(GetPath(), GetBookmarkBarModel())) return NULL; history_service_.swap(history); - history_service_created_ = true; // Send out the notification that the history service was created. NotificationService::current()-> @@ -844,8 +852,10 @@ bool ProfileImpl::HasBookmarkBarModel() { } BookmarkBarModel* ProfileImpl::GetBookmarkBarModel() { - if (!bookmark_bar_model_.get()) + if (!bookmark_bar_model_.get()) { bookmark_bar_model_.reset(new BookmarkBarModel(this)); + bookmark_bar_model_->Load(); + } return bookmark_bar_model_.get(); } |