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

Unified Diff: chrome/browser/extensions/extension_context_menu_model.cc

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 8 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/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);
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.h ('k') | chrome/browser/extensions/extension_cookies_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698