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

Unified Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 7891018: Fixes possible deadlock between history and bookmarks. The deadlock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/bookmarks/bookmark_model.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model.cc
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 6fb0cdf1d34b3c96782535d2a7b7fa25fada87b8..e663b4dfa48ab0add7303e6172ef0335256972dc 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -120,7 +120,7 @@ BookmarkModel::BookmarkModel(Profile* profile)
synced_node_(NULL),
next_node_id_(1),
observers_(ObserverList<BookmarkModelObserver>::NOTIFY_EXISTING_ONLY),
- loaded_signal_(TRUE, FALSE) {
+ loaded_signal_(true, false) {
if (!profile_) {
// Profile is null during testing.
DoneLoading(CreateLoadDetails());
@@ -144,6 +144,14 @@ void BookmarkModel::RegisterUserPrefs(PrefService* prefs) {
PrefService::SYNCABLE_PREF);
}
+void BookmarkModel::Cleanup() {
+ if (loaded_)
+ return;
+
+ // See comment in Profile shutdown code where this is invoked for details.
+ loaded_signal_.Signal();
+}
+
void BookmarkModel::Load() {
if (store_.get()) {
// If the store is non-null, it means Load was already invoked. Load should
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698