Index: chrome/browser/extensions/extension_tab_util.cc |
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc |
index 75991084362ed7a7bf035ce92d800d3c9c5b584b..0b6abfc46c5f0530c49c15b32fd6845900f623e6 100644 |
--- a/chrome/browser/extensions/extension_tab_util.cc |
+++ b/chrome/browser/extensions/extension_tab_util.cc |
@@ -31,6 +31,7 @@ |
#include "extensions/common/constants.h" |
#include "extensions/common/error_utils.h" |
#include "extensions/common/extension.h" |
+#include "extensions/common/feature_switch.h" |
#include "extensions/common/manifest_constants.h" |
#include "extensions/common/manifest_handlers/incognito_info.h" |
#include "extensions/common/permissions/api_permission.h" |
@@ -566,7 +567,21 @@ void ExtensionTabUtil::OpenOptionsPage(const Extension* extension, |
browser = displayer->browser(); |
} |
- content::OpenURLParams params(ManifestURL::GetOptionsPage(extension), |
+ GURL options_url; |
+ if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled()) { |
Devlin
2014/08/19 22:20:41
Maybe a quick comment to say what the implications
Devlin
2014/08/19 22:20:41
no extensions::
ericzeng
2014/08/19 22:47:51
Done.
|
+ options_url = GURL(chrome::kChromeUIExtensionsURL); |
+ if (!extension->id().empty()) { |
+ GURL::Replacements replacements; |
+ std::string query("options="); |
+ query += extension->id(); |
Devlin
2014/08/19 22:20:41
use StringPrintf here:
std::string query = base::S
ericzeng
2014/08/19 22:47:51
Done.
|
+ replacements.SetQueryStr(query); |
+ options_url = options_url.ReplaceComponents(replacements); |
+ } |
+ } else { |
+ options_url = ManifestURL::GetOptionsPage(extension); |
+ } |
+ |
+ content::OpenURLParams params(options_url, |
content::Referrer(), |
SINGLETON_TAB, |
content::PAGE_TRANSITION_LINK, |