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

Unified Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_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/media_galleries_private/media_galleries_private_api.cc
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
index f5801f09243df09e7bf1d7f85292ed21a22d2a56..3bd212ac2c07fee57b00892da58666143cd0dc26 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
@@ -84,7 +84,7 @@ MediaGalleriesPrivateAPI::MediaGalleriesPrivateAPI(
content::BrowserContext* context)
: profile_(Profile::FromBrowserContext(context)), weak_ptr_factory_(this) {
DCHECK(profile_);
- EventRouter* event_router = ExtensionSystem::Get(profile_)->event_router();
+ EventRouter* event_router = EventRouter::Get(profile_);
event_router->RegisterObserver(
this, media_galleries_private::OnGalleryChanged::kEventName);
}
@@ -93,7 +93,7 @@ MediaGalleriesPrivateAPI::~MediaGalleriesPrivateAPI() {
}
void MediaGalleriesPrivateAPI::Shutdown() {
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+ EventRouter::Get(profile_)->UnregisterObserver(this);
weak_ptr_factory_.InvalidateWeakPtrs();
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698