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

Unified Diff: chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc

Issue 2559323002: Add a policy to always show the Cast toolbar icon (Closed)
Patch Set: Created 4 years 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/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..365c41a6836147bf5a560ff1a0764e5de2a87db9 100644
--- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/toolbar/media_router_action_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "extensions/common/feature_switch.h"
@@ -44,6 +45,8 @@ ComponentToolbarActionsFactory* ComponentToolbarActionsFactory::GetInstance() {
std::set<std::string> ComponentToolbarActionsFactory::GetInitialComponentIds(
Profile* profile) {
std::set<std::string> component_ids;
+ if (MediaRouterActionController::IsActionShownByPolicy(profile))
imcheng 2016/12/15 19:57:38 Seems like we also need to check media_router::Med
takumif 2016/12/15 22:04:14 Yes, we should. Done.
+ component_ids.insert(kMediaRouterActionId);
return component_ids;
}

Powered by Google App Engine
This is Rietveld 408576698