Index: chrome/browser/extensions/extension_bookmarks_module.cc |
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc |
index 8262c508bff79269ff90e33319185d545e087c3d..8311c5b41566814cda0c692aa74479607ae3ff07 100644 |
--- a/chrome/browser/extensions/extension_bookmarks_module.cc |
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc |
@@ -79,7 +79,7 @@ void BookmarksFunction::Run() { |
if (!model->IsLoaded()) { |
// Bookmarks are not ready yet. We'll wait. |
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED, |
- NotificationService::AllSources()); |
+ Source<Profile>(profile())); |
AddRef(); // Balanced in Observe(). |
return; |
} |
@@ -113,7 +113,8 @@ bool BookmarksFunction::EditBookmarksEnabled() { |
void BookmarksFunction::Observe(int type, |
const NotificationSource& source, |
const NotificationDetails& details) { |
- DCHECK(type == chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED); |
+ DCHECK_EQ(type, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED); |
Peter Kasting
2011/08/08 18:47:37
Nit: (expected, actual) (2 places)
|
+ DCHECK_EQ(Source<Profile>(source).ptr(), profile()); |
DCHECK(profile()->GetBookmarkModel()->IsLoaded()); |
Run(); |
Release(); // Balanced in Run(). |