| 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..eda7b97171c67fa71e79fb3fdca57b41050675ff 100644
|
| --- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
|
| +++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
|
| @@ -11,6 +11,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
|
| +#include "chrome/common/pref_names.h"
|
| #include "extensions/common/feature_switch.h"
|
|
|
| #if defined(ENABLE_MEDIA_ROUTER)
|
| @@ -44,6 +45,10 @@ ComponentToolbarActionsFactory* ComponentToolbarActionsFactory::GetInstance() {
|
| std::set<std::string> ComponentToolbarActionsFactory::GetInitialComponentIds(
|
| Profile* profile) {
|
| std::set<std::string> component_ids;
|
| +#if defined(ENABLE_MEDIA_ROUTER)
|
| + if (profile->GetPrefs()->GetBoolean(prefs::kMediaRouterAlwaysShowActionIcon))
|
| + component_ids.insert(kMediaRouterActionId);
|
| +#endif // defined(ENABLE_MEDIA_ROUTER)
|
| return component_ids;
|
| }
|
|
|
| @@ -93,4 +98,3 @@ void ComponentToolbarActionsFactory::HandleComponentMigrations(
|
| helper->OnFeatureDisabled(kMediaRouterActionId);
|
| }
|
| }
|
| -
|
|
|