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

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: all is built on sand 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 33a0d19bfa76ca78ca0d7c06f6f026b53df1a436..8c31a72dd6b62892079fa540cee8923c6e576f0c 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -117,22 +117,13 @@ void BookmarksFunction::Observe(NotificationType type,
Release(); // Balanced in Run().
}
-// static
-ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetInstance() {
- return Singleton<ExtensionBookmarkEventRouter>::get();
-}
-
-ExtensionBookmarkEventRouter::ExtensionBookmarkEventRouter() {
-}
+ExtensionBookmarkEventRouter::ExtensionBookmarkEventRouter() {}
-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,
« no previous file with comments | « chrome/browser/extensions/extension_bookmarks_module.h ('k') | chrome/browser/extensions/extension_cookies_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698