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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_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/downloads/downloads_api.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index 7342c6944966580c04e3e977e0befda1c1047073..616ccf3140f11cde0666b0e2f044986e34589187 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1861,7 +1861,7 @@ void ExtensionDownloadsEventRouter::DispatchEvent(
const extensions::Event::WillDispatchCallback& will_dispatch_callback,
base::Value* arg) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!extensions::ExtensionSystem::Get(profile_)->event_router())
+ if (!extensions::EventRouter::Get(profile_))
return;
scoped_ptr<base::ListValue> args(new base::ListValue());
args->Append(arg);
@@ -1877,8 +1877,7 @@ void ExtensionDownloadsEventRouter::DispatchEvent(
event->restrict_to_browser_context =
(include_incognito && !profile_->IsOffTheRecord()) ? NULL : profile_;
event->will_dispatch_callback = will_dispatch_callback;
- extensions::ExtensionSystem::Get(profile_)->event_router()->
- BroadcastEvent(event.Pass());
+ extensions::EventRouter::Get(profile_)->BroadcastEvent(event.Pass());
DownloadsNotificationSource notification_source;
notification_source.event_name = event_name;
notification_source.profile = profile_;
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_api.cc ('k') | chrome/browser/extensions/api/extension_action/extension_action_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698