| Index: chrome/common/extensions/extension.cc
|
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
|
| index 1b623538d0ce3e7064f8213bb0938268844e8943..f498c879b9db398c505159afad3b316a50c2c9a5 100644
|
| --- a/chrome/common/extensions/extension.cc
|
| +++ b/chrome/common/extensions/extension.cc
|
| @@ -2327,17 +2327,6 @@ bool Extension::InitFromValue(const DictionaryValue& source, int flags,
|
| return true;
|
| }
|
|
|
| -// static
|
| -std::string Extension::ChromeStoreLaunchURL() {
|
| - std::string gallery_prefix = extension_urls::kGalleryBrowsePrefix;
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
|
| - gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| - switches::kAppsGalleryURL);
|
| - if (EndsWith(gallery_prefix, "/", true))
|
| - gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
|
| - return gallery_prefix;
|
| -}
|
| -
|
| GURL Extension::GetHomepageURL() const {
|
| if (homepage_url_.is_valid())
|
| return homepage_url_;
|
| @@ -2345,10 +2334,7 @@ GURL Extension::GetHomepageURL() const {
|
| if (!UpdatesFromGallery())
|
| return GURL();
|
|
|
| - // TODO(erikkay): This may not be entirely correct with the webstore.
|
| - // I think it will have a mixture of /extensions/detail and /webstore/detail
|
| - // URLs. Perhaps they'll handle this nicely with redirects?
|
| - GURL url(ChromeStoreLaunchURL() + std::string("/detail/") + id());
|
| + GURL url(extension_misc::GetWebstoreItemDetailURLPrefix() + id());
|
| return url;
|
| }
|
|
|
| @@ -2719,7 +2705,8 @@ bool Extension::CanExecuteScriptOnPage(const GURL& page_url,
|
| // like extensions removing the "report abuse" link).
|
| // TODO(erikkay): This seems like the wrong test. Shouldn't we we testing
|
| // against the store app extent?
|
| - if ((page_url.host() == GURL(Extension::ChromeStoreLaunchURL()).host()) &&
|
| + GURL store_url(extension_misc::GetWebstoreLaunchURL());
|
| + if ((page_url.host() == store_url.host()) &&
|
| !CanExecuteScriptEverywhere() &&
|
| !CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kAllowScriptingGallery)) {
|
|
|