summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-16 23:32:48 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-16 23:32:48 +0000
commit2edb5be9a3a08a9527cd04ad302ba2376a22c4d6 (patch)
tree569ee3be94833c06e2baf6bd943f24a7acf39dad /chrome
parent3648b96e78d0a10a6ed5b4e629915fa884cf4d0f (diff)
downloadchromium_src-2edb5be9a3a08a9527cd04ad302ba2376a22c4d6.zip
chromium_src-2edb5be9a3a08a9527cd04ad302ba2376a22c4d6.tar.gz
chromium_src-2edb5be9a3a08a9527cd04ad302ba2376a22c4d6.tar.bz2
Reuse the existing tab when opening the Manage Extensions page and the Options page for an extension.
Thanks to Phistuck for pointing this out. Also, use IDS_MANAGE_EXTENSIONS for all locales on dev (it will get translated in the next run). BUG=None TEST=Use the extension context menu and Manage Extensions and Configure should not open new tabs if that tab already exists. Review URL: http://codereview.chromium.org/551056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_action_context_menu_model.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/browser/extensions/extension_action_context_menu_model.cc b/chrome/browser/extensions/extension_action_context_menu_model.cc
index 7c32719..1a0409a 100644
--- a/chrome/browser/extensions/extension_action_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_action_context_menu_model.cc
@@ -33,14 +33,7 @@ ExtensionActionContextMenuModel::ExtensionActionContextMenuModel(
AddItemWithStringId(UNINSTALL, IDS_EXTENSIONS_UNINSTALL);
AddSeparator();
- // TODO(finnur): It is too late in the process to do another round of
- // translations, so we'll switch fully to IDS_MANAGE_EXTENSIONS after merging
- // this to the beta branch. :/
- std::string locale = g_browser_process->GetApplicationLocale();
- if (locale.find_first_of("en-") == 0)
- AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
- else
- AddItemWithStringId(MANAGE, IDS_SHOW_EXTENSIONS);
+ AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
}
ExtensionActionContextMenuModel::~ExtensionActionContextMenuModel() {
@@ -76,7 +69,7 @@ void ExtensionActionContextMenuModel::ExecuteCommand(int command_id) {
case CONFIGURE:
DCHECK(!extension_->options_url().is_empty());
browser->OpenURL(extension_->options_url(), GURL(),
- NEW_FOREGROUND_TAB, PageTransition::LINK);
+ SINGLETON_TAB, PageTransition::LINK);
break;
case DISABLE: {
ExtensionsService* extension_service = profile->GetExtensionsService();
@@ -94,7 +87,7 @@ void ExtensionActionContextMenuModel::ExecuteCommand(int command_id) {
}
case MANAGE: {
browser->OpenURL(GURL(chrome::kChromeUIExtensionsURL), GURL(),
- NEW_FOREGROUND_TAB, PageTransition::LINK);
+ SINGLETON_TAB, PageTransition::LINK);
break;
}
default: