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

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

Issue 2450633004: Make ToolbarActionsModel ignore calls to AddComponentAction() before initialization (Closed)
Patch Set: Created 4 years, 2 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/media_router_action_controller.cc
diff --git a/chrome/browser/ui/toolbar/media_router_action_controller.cc b/chrome/browser/ui/toolbar/media_router_action_controller.cc
index 722745255b949eb1d22bd56fda177439e377fe63..1fac119e976cd5eb2b1becfa43b678aa99a2fb0c 100644
--- a/chrome/browser/ui/toolbar/media_router_action_controller.cc
+++ b/chrome/browser/ui/toolbar/media_router_action_controller.cc
@@ -61,6 +61,9 @@ MediaRouterActionController::MediaRouterActionController(
}
void MediaRouterActionController::MaybeAddOrRemoveAction() {
+ if (!component_action_delegate_->ActionsInitialized())
Devlin 2016/10/25 22:12:13 I'd have a slight preference to put this check in
takumif 2016/10/26 01:22:01 Yeah, that would be simpler. I thought about addi
+ return;
+
if (ShouldEnableAction()) {
if (!component_action_delegate_->HasComponentAction(
ComponentToolbarActionsFactory::kMediaRouterActionId))

Powered by Google App Engine
This is Rietveld 408576698