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

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

Issue 2760403003: Remove enable_media_router. (Closed)
Patch Set: . Created 3 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/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 2167cdb386e96920e1575b308d6f3430ba8b048d..ccca4bfbc8f808d16307b5000e33b43953ce926f 100644
--- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
@@ -10,15 +10,12 @@
#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.h"
+#include "chrome/browser/ui/toolbar/media_router_action_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
#include "extensions/browser/extension_registry.h"
-#if defined(ENABLE_MEDIA_ROUTER)
-#include "chrome/browser/ui/toolbar/media_router_action.h"
-#include "chrome/browser/ui/toolbar/media_router_action_controller.h"
-#endif
-
// static
const char ComponentToolbarActionsFactory::kCastBetaExtensionId[] =
"dliochdbjfkdbacpmhlcpmleaejidimm";
@@ -29,12 +26,10 @@ const char ComponentToolbarActionsFactory::kMediaRouterActionId[] =
ComponentToolbarActionsFactory::ComponentToolbarActionsFactory(Profile* profile)
: profile_(profile) {
-#if defined(ENABLE_MEDIA_ROUTER)
if (media_router::MediaRouterEnabled(profile_) &&
MediaRouterActionController::IsActionShownByPolicy(profile_)) {
initial_ids_.insert(kMediaRouterActionId);
}
-#endif
}
ComponentToolbarActionsFactory::~ComponentToolbarActionsFactory() {}
@@ -64,11 +59,9 @@ ComponentToolbarActionsFactory::GetComponentToolbarActionForId(
// (since each will have an action in the toolbar or overflow menu), this
// should be okay. If this changes, we should rethink this design to have,
// e.g., RegisterChromeAction().
-#if defined(ENABLE_MEDIA_ROUTER)
if (action_id == kMediaRouterActionId)
return std::unique_ptr<ToolbarActionViewController>(
new MediaRouterAction(browser, bar));
-#endif // defined(ENABLE_MEDIA_ROUTER)
NOTREACHED();
return std::unique_ptr<ToolbarActionViewController>();
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698