diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
commit | ad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch) | |
tree | 3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/sync/util | |
parent | 75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff) | |
download | chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2 |
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716
Review URL: http://codereview.chromium.org/8342048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/util')
-rw-r--r-- | chrome/browser/sync/util/extensions_activity_monitor.cc | 4 | ||||
-rw-r--r-- | chrome/browser/sync/util/extensions_activity_monitor_unittest.cc | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.cc b/chrome/browser/sync/util/extensions_activity_monitor.cc index 6a7cdcf..66b0fbb 100644 --- a/chrome/browser/sync/util/extensions_activity_monitor.cc +++ b/chrome/browser/sync/util/extensions_activity_monitor.cc @@ -9,7 +9,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" namespace browser_sync { @@ -34,7 +34,7 @@ class RegistrationTask : public Task { // Observe. registrar_->Add(monitor_, chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } private: diff --git a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc index 7213af0..5e2283b 100644 --- a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc +++ b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc @@ -13,7 +13,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_service.h" +#include "content/browser/notification_service_impl.h" #include "testing/gtest/include/gtest/gtest.h" using browser_sync::ExtensionsActivityMonitor; @@ -46,7 +46,7 @@ class BookmarkAPIEventTask : public Task { extension_(e), function_(t), repeats_(repeats), done_(done) {} virtual void Run() { for (size_t i = 0; i < repeats_; i++) { - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED, content::Source<Extension>(extension_.get()), content::Details<const BookmarksFunction>(function_.get())); @@ -91,16 +91,16 @@ class BookmarkAPIEventGenerator { class DoUIThreadSetupTask : public Task { public: - DoUIThreadSetupTask(NotificationService** service, + DoUIThreadSetupTask(content::NotificationService** service, base::WaitableEvent* done) : service_(service), signal_when_done_(done) {} virtual ~DoUIThreadSetupTask() {} virtual void Run() { - *service_ = new NotificationService(); + *service_ = new NotificationServiceImpl(); signal_when_done_->Signal(); } private: - NotificationService** service_; + content::NotificationService** service_; base::WaitableEvent* signal_when_done_; DISALLOW_COPY_AND_ASSIGN(DoUIThreadSetupTask); }; @@ -139,7 +139,7 @@ class ExtensionsActivityMonitorTest : public testing::Test { return extension->id(); } private: - NotificationService* service_; + content::NotificationService* service_; BrowserThread ui_thread_; }; |