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

Unified Diff: chrome/browser/extensions/extension_bookmarks_module.cc

Issue 6961027: Change event routers from singletons to being owned by the ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asargent and dmazzoni's comments Created 9 years, 7 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
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 37a814fcccb0a0d8bc04d3cb06dca8c805e9ea90..c46260385d11f320df1e5978baaefbf2c74ba992 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -117,22 +117,9 @@ void BookmarksFunction::Observe(NotificationType type,
Release(); // Balanced in Run().
}
-// static
-ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetInstance() {
- return Singleton<ExtensionBookmarkEventRouter>::get();
-}
-
-ExtensionBookmarkEventRouter::ExtensionBookmarkEventRouter() {
-}
-
-ExtensionBookmarkEventRouter::~ExtensionBookmarkEventRouter() {
-}
-
void ExtensionBookmarkEventRouter::Observe(BookmarkModel* model) {
- if (models_.find(model) == models_.end()) {
- model->AddObserver(this);
- models_.insert(model);
- }
+ model->AddObserver(this);
+ model_ = model;
}
void ExtensionBookmarkEventRouter::DispatchEvent(Profile *profile,

Powered by Google App Engine
This is Rietveld 408576698