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

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: Rebase Created 3 years, 11 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/toolbar/media_router_action_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..334bda9e42fff5438b51a713d7bd5581d61b78a5 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,11 @@ ComponentToolbarActionsFactory* ComponentToolbarActionsFactory::GetInstance() {
std::set<std::string> ComponentToolbarActionsFactory::GetInitialComponentIds(
Profile* profile) {
std::set<std::string> component_ids;
+ if (media_router::MediaRouterEnabled(profile) &&
+ MediaRouterActionController::IsActionShownByPolicy(profile)) {
+ component_ids.insert(kMediaRouterActionId);
+ }
+
return component_ids;
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/toolbar/media_router_action_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698