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

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: fix compile error for chromeos build. 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 590eaa6eb16975df6d58ead30cd055a612f4716b..c8e68a4269161ffeab5596156b1960a590eb7184 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -21,7 +21,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.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"
@@ -158,7 +157,7 @@ class NotificationsApiDelegate : public NotificationDelegate {
}
virtual bool HasClickedListener() OVERRIDE {
- return ExtensionSystem::Get(profile_)->event_router()->HasEventListener(
+ return EventRouter::Get(profile_)->HasEventListener(
notifications::OnClicked::kEventName);
}
@@ -198,8 +197,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