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

Unified Diff: chrome/browser/ui/app_list/search/people/people_result.cc

Issue 238963002: 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/ui/app_list/search/people/people_result.cc
diff --git a/chrome/browser/ui/app_list/search/people/people_result.cc b/chrome/browser/ui/app_list/search/people/people_result.cc
index 6c6156baf36fd3cd71ff11cf824bb159d670ede6..f3b24ec128f040c56b3a0f5b026e71920e0fd622 100644
--- a/chrome/browser/ui/app_list/search/people/people_result.cc
+++ b/chrome/browser/ui/app_list/search/people/people_result.cc
@@ -20,7 +20,6 @@
#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/user_metrics.h"
#include "extensions/browser/event_router.h"
-#include "extensions/browser/extension_system.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -164,9 +163,8 @@ void PeopleResult::OpenChat() {
// TODO(rkc): Change this once we remove the hangoutsPrivate API.
// See crbug.com/306672
- extensions::ExtensionSystem::Get(
- profile_)->event_router()->DispatchEventToExtension(
- hangouts_extension_id_, event.Pass());
+ extensions::EventRouter::Get(profile_)
+ ->DispatchEventToExtension(hangouts_extension_id_, event.Pass());
content::RecordAction(base::UserMetricsAction("PeopleSearch_OpenChat"));
}
@@ -185,8 +183,7 @@ void PeopleResult::RefreshHangoutsExtensionId() {
// TODO(rkc): Change this once we remove the hangoutsPrivate API.
// See crbug.com/306672
for (size_t i = 0; i < arraysize(kHangoutsExtensionIds); ++i) {
- if (extensions::ExtensionSystem::Get(
- profile_)->event_router()->ExtensionHasEventListener(
+ if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener(
kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) {
hangouts_extension_id_ = kHangoutsExtensionIds[i];
return;

Powered by Google App Engine
This is Rietveld 408576698