| Index: chrome/common/extensions/extension.cc
|
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
|
| index 92236ff4fcd696a35372cacf06a2291014eb6272..056ec2689cc7e054a9d904ce8bcd207be262e42b 100644
|
| --- a/chrome/common/extensions/extension.cc
|
| +++ b/chrome/common/extensions/extension.cc
|
| @@ -2104,8 +2104,10 @@ bool Extension::LoadPageAction(string16* error) {
|
| return false; // Failed to parse page action definition.
|
| declared_action_type_ = ExtensionAction::TYPE_PAGE;
|
|
|
| + // The action box changes the meaning of the page action area, so we need
|
| + // to convert page actions into browser actions.
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableBrowserActionsForAll)) {
|
| + switches::kEnableActionBox)) {
|
| browser_action_ = page_action_.Pass();
|
| // declared_action_type_ stays the same; that's the point.
|
| }
|
| @@ -2130,22 +2132,6 @@ bool Extension::LoadBrowserAction(string16* error) {
|
| return true;
|
| }
|
|
|
| -void Extension::GenerateBrowserActionIfPossible() {
|
| - // It only makes sense to generate brower actions for extensions that are
|
| - // shown in chrome://extensions.
|
| - if (!ShouldDisplayInExtensionSettings())
|
| - return;
|
| -
|
| - // Hosted and platform apps are shown in extension settings, but we don't
|
| - // want to generate browser actions for those either, since they can't define
|
| - // browser actions.
|
| - if (is_app())
|
| - return;
|
| -
|
| - browser_action_.reset(new ExtensionAction(id()));
|
| - browser_action_->SetTitle(ExtensionAction::kDefaultTabId, name());
|
| -}
|
| -
|
| bool Extension::LoadFileBrowserHandlers(string16* error) {
|
| if (!manifest_->HasKey(keys::kFileBrowserHandlers))
|
| return true;
|
| @@ -2906,12 +2892,6 @@ bool Extension::InitFromValue(int flags, string16* error) {
|
| if (!LoadThemeFeatures(error))
|
| return false;
|
|
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableBrowserActionsForAll) &&
|
| - !browser_action()) {
|
| - GenerateBrowserActionIfPossible();
|
| - }
|
| -
|
| if (HasMultipleUISurfaces()) {
|
| *error = ASCIIToUTF16(errors::kOneUISurfaceOnly);
|
| return false;
|
|
|