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

Unified Diff: chrome/browser/extensions/api/notifications/notifications_api.cc

Issue 238633009: cleanup: Use EventRouter instead of ExtensionSystem::Get->event_router() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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/api/notifications/notifications_api.cc
diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
index 14bfc28a010b90f40fafd9d100bad70dd00fbbc2..472d88760e58c35290b5e42549c085c642f58d88 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -20,7 +20,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "extensions/browser/event_router.h"
-#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
#include "extensions/common/features/feature.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -157,8 +156,8 @@ class NotificationsApiDelegate : public NotificationDelegate {
}
virtual bool HasClickedListener() OVERRIDE {
- return ExtensionSystem::Get(profile_)->event_router()->HasEventListener(
- notifications::OnClicked::kEventName);
+ return EventRouter::Get(profile_)
+ ->HasEventListener(notifications::OnClicked::kEventName);
}
virtual void ButtonClick(int index) OVERRIDE {
@@ -194,8 +193,8 @@ class NotificationsApiDelegate : public NotificationDelegate {
void SendEvent(const std::string& name, scoped_ptr<base::ListValue> args) {
scoped_ptr<Event> event(new Event(name, args.Pass()));
- ExtensionSystem::Get(profile_)->event_router()->DispatchEventToExtension(
- extension_id_, event.Pass());
+ EventRouter::Get(profile_)
+ ->DispatchEventToExtension(extension_id_, event.Pass());
}
scoped_ptr<base::ListValue> CreateBaseEventArgs() {

Powered by Google App Engine
This is Rietveld 408576698