| Index: chrome/browser/extensions/extension_context_menu_model.cc
|
| diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
|
| index 26324045e6e3dc1bc3d72e011f869bc3f5a5bdfa..0bf5fe0a3207e243be7d7cefbc281d3b02170cc0 100644
|
| --- a/chrome/browser/extensions/extension_context_menu_model.cc
|
| +++ b/chrome/browser/extensions/extension_context_menu_model.cc
|
| @@ -47,27 +47,6 @@ ExtensionContextMenuModel::ExtensionContextMenuModel(
|
| InitCommonCommands();
|
| }
|
|
|
| -ExtensionContextMenuModel::~ExtensionContextMenuModel() {
|
| -}
|
| -
|
| -void ExtensionContextMenuModel::InitCommonCommands() {
|
| - const Extension* extension = GetExtension();
|
| -
|
| - // The extension pointer should only be null if the extension was uninstalled,
|
| - // and since the menu just opened, it should still be installed.
|
| - DCHECK(extension);
|
| -
|
| - AddItem(NAME, UTF8ToUTF16(extension->name()));
|
| - AddSeparator();
|
| - AddItemWithStringId(CONFIGURE, IDS_EXTENSIONS_OPTIONS_MENU_ITEM);
|
| - AddItemWithStringId(DISABLE, IDS_EXTENSIONS_DISABLE);
|
| - AddItem(UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
|
| - if (extension->browser_action())
|
| - AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
|
| - AddSeparator();
|
| - AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
|
| -}
|
| -
|
| bool ExtensionContextMenuModel::IsCommandIdChecked(int command_id) const {
|
| return false;
|
| }
|
| @@ -153,6 +132,26 @@ void ExtensionContextMenuModel::ExtensionUninstallCanceled() {
|
| Release();
|
| }
|
|
|
| +ExtensionContextMenuModel::~ExtensionContextMenuModel() {}
|
| +
|
| +void ExtensionContextMenuModel::InitCommonCommands() {
|
| + const Extension* extension = GetExtension();
|
| +
|
| + // The extension pointer should only be null if the extension was uninstalled,
|
| + // and since the menu just opened, it should still be installed.
|
| + DCHECK(extension);
|
| +
|
| + AddItem(NAME, UTF8ToUTF16(extension->name()));
|
| + AddSeparator();
|
| + AddItemWithStringId(CONFIGURE, IDS_EXTENSIONS_OPTIONS_MENU_ITEM);
|
| + AddItemWithStringId(DISABLE, IDS_EXTENSIONS_DISABLE);
|
| + AddItem(UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
|
| + if (extension->browser_action())
|
| + AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
|
| + AddSeparator();
|
| + AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
|
| +}
|
| +
|
| const Extension* ExtensionContextMenuModel::GetExtension() const {
|
| ExtensionService* extension_service = profile_->GetExtensionService();
|
| return extension_service->GetExtensionById(extension_id_, false);
|
|
|