| Index: chrome/browser/extensions/location_bar_controller.cc
|
| diff --git a/chrome/browser/extensions/location_bar_controller.cc b/chrome/browser/extensions/location_bar_controller.cc
|
| index 12ad8dba73f66c676cfc8c47d7dfcc9c53773ace..e0be5d9db014027a0b5de649d3c227dafcc6319d 100644
|
| --- a/chrome/browser/extensions/location_bar_controller.cc
|
| +++ b/chrome/browser/extensions/location_bar_controller.cc
|
| @@ -9,6 +9,7 @@
|
| #include "chrome/browser/extensions/extension_action_manager.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "extensions/browser/extension_registry.h"
|
| +#include "extensions/common/feature_switch.h"
|
|
|
| namespace extensions {
|
|
|
| @@ -16,9 +17,12 @@ LocationBarController::LocationBarController(
|
| content::WebContents* web_contents)
|
| : web_contents_(web_contents),
|
| browser_context_(web_contents->GetBrowserContext()),
|
| + should_show_page_actions_(
|
| + !FeatureSwitch::extension_action_redesign()->IsEnabled()),
|
| active_script_controller_(new ActiveScriptController(web_contents_)),
|
| extension_registry_observer_(this) {
|
| - extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
|
| + if (should_show_page_actions_)
|
| + extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
|
| }
|
|
|
| LocationBarController::~LocationBarController() {
|
| @@ -30,6 +34,9 @@ std::vector<ExtensionAction*> LocationBarController::GetCurrentActions() {
|
| ExtensionActionManager* action_manager =
|
| ExtensionActionManager::Get(browser_context_);
|
| std::vector<ExtensionAction*> current_actions;
|
| + if (!should_show_page_actions_)
|
| + return current_actions;
|
| +
|
| for (ExtensionSet::const_iterator iter = extensions.begin();
|
| iter != extensions.end();
|
| ++iter) {
|
|
|