Chromium Code Reviews| Index: chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc |
| diff --git a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc |
| index 487a59a88d9ba57f538fb13f71c930c0a21db8ee..f5caf416c39ac2acde264880c6604e5153579d8a 100644 |
| --- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc |
| +++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/lazy_instance.h" |
| #include "chrome/browser/extensions/component_migration_helper.h" |
| #include "chrome/browser/media/router/media_router_feature.h" |
| +#include "chrome/browser/media/router/media_router_ui_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" |
| @@ -94,3 +95,8 @@ void ComponentToolbarActionsFactory::HandleComponentMigrations( |
| } |
| } |
| +void ComponentToolbarActionsFactory::InitializeComponentActionControllers( |
| + Profile* profile) { |
| + if (media_router::MediaRouterEnabled(profile)) |
| + media_router::MediaRouterUIService::Get(profile); |
|
Devlin
2016/09/15 21:19:17
Would this same effect be achieved by KeyedService
takumif
2016/09/16 21:19:22
Yes, using ServiceIsCreatedWithContext() (didn't k
|
| +} |