Chromium Code Reviews| Index: chrome/browser/extensions/extension_bookmarks_module.h |
| diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h |
| index 8c3063fae772d61008a05605180d48fb7692e0fb..5d1a717107860482e6a93092af2c063b8e499861 100644 |
| --- a/chrome/browser/extensions/extension_bookmarks_module.h |
| +++ b/chrome/browser/extensions/extension_bookmarks_module.h |
| @@ -12,7 +12,6 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/ref_counted.h" |
| -#include "base/memory/singleton.h" |
| #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| #include "chrome/browser/extensions/extension_function.h" |
| #include "chrome/browser/ui/shell_dialogs.h" |
| @@ -25,11 +24,10 @@ class FilePath; |
| // the extension system. |
| class ExtensionBookmarkEventRouter : public BookmarkModelObserver { |
| public: |
| - static ExtensionBookmarkEventRouter* GetInstance(); |
| - virtual ~ExtensionBookmarkEventRouter(); |
| + explicit ExtensionBookmarkEventRouter() {} |
| + virtual ~ExtensionBookmarkEventRouter() {} |
|
asargent_no_longer_on_chrome
2011/05/24 18:18:00
nit: probably shouldn't inline the constructor/des
Yoyo Zhou
2011/05/24 19:17:55
Done here and elsewhere.
|
| - // Call this for each model to observe. Safe to call multiple times per |
| - // model. |
| + // Initialize to observe this bookmark model. |
| void Observe(BookmarkModel* model); |
| // BookmarkModelObserver: |
| @@ -57,18 +55,13 @@ class ExtensionBookmarkEventRouter : public BookmarkModelObserver { |
| virtual void BookmarkImportEnding(BookmarkModel* model) OVERRIDE; |
| private: |
| - ExtensionBookmarkEventRouter(); |
| - friend struct DefaultSingletonTraits<ExtensionBookmarkEventRouter>; |
| - |
| // Helper to actually dispatch an event to extension listeners. |
| void DispatchEvent(Profile* profile, |
| const char* event_name, |
| const std::string& json_args); |
| - // These are stored so that Observe can be called multiple times safely. |
| - // This way the caller doesn't have to know whether it's already observing |
| - // a particular model or not. The pointers are not owned by this object. |
| - std::set<BookmarkModel*> models_; |
| + // The model being observed. |
| + BookmarkModel* model_; |
| DISALLOW_COPY_AND_ASSIGN(ExtensionBookmarkEventRouter); |
| }; |