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

Unified Diff: chrome/browser/extensions/api/dial/dial_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/dial/dial_api.cc
diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc
index 36f9805159e9fa219bd7576561a1c2d03cec2d74..f9a95390e67629d17a47d329b5fff0acd6914a3c 100644
--- a/chrome/browser/extensions/api/dial/dial_api.cc
+++ b/chrome/browser/extensions/api/dial/dial_api.cc
@@ -39,8 +39,8 @@ namespace dial = api::dial;
DialAPI::DialAPI(Profile* profile)
: RefcountedBrowserContextKeyedService(BrowserThread::IO),
profile_(profile) {
- ExtensionSystem::Get(profile)->event_router()->RegisterObserver(
- this, dial::OnDeviceList::kEventName);
+ EventRouter::Get(profile)
+ ->RegisterObserver(this, dial::OnDeviceList::kEventName);
}
DialAPI::~DialAPI() {}
@@ -108,8 +108,7 @@ void DialAPI::SendEventOnUIThread(const DialRegistry::DeviceList& devices) {
scoped_ptr<base::ListValue> results = api::dial::OnDeviceList::Create(args);
scoped_ptr<Event> event(
new Event(dial::OnDeviceList::kEventName, results.Pass()));
- extensions::ExtensionSystem::Get(profile_)->event_router()->
- BroadcastEvent(event.Pass());
+ EventRouter::Get(profile_)->BroadcastEvent(event.Pass());
}
void DialAPI::SendErrorOnUIThread(const DialRegistry::DialErrorCode code) {
@@ -139,8 +138,7 @@ void DialAPI::SendErrorOnUIThread(const DialRegistry::DialErrorCode code) {
scoped_ptr<base::ListValue> results = api::dial::OnError::Create(dial_error);
scoped_ptr<Event> event(new Event(dial::OnError::kEventName, results.Pass()));
- extensions::ExtensionSystem::Get(profile_)->event_router()->
- BroadcastEvent(event.Pass());
+ EventRouter::Get(profile_)->BroadcastEvent(event.Pass());
}
void DialAPI::ShutdownOnUIThread() {}

Powered by Google App Engine
This is Rietveld 408576698