diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 04:56:30 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 04:56:30 +0000 |
commit | 4fba649e127a7e1ea6a359edf560fc4be86e92c0 (patch) | |
tree | af16a66705dcab124b7ad7847eb38e7d222c21c9 /chrome/common/extensions | |
parent | 26f16b508c8f1d44ca12a95dfcc25193c700f6c3 (diff) | |
download | chromium_src-4fba649e127a7e1ea6a359edf560fc4be86e92c0.zip chromium_src-4fba649e127a7e1ea6a359edf560fc4be86e92c0.tar.gz chromium_src-4fba649e127a7e1ea6a359edf560fc4be86e92c0.tar.bz2 |
Revert 50333 - Only allow installation of extensions/apps with gallery update url via download from gallery
Because of multiple failures of unit_tests and interactive_ui_tests.
BUG=45542
TEST=NONE
Review URL: http://codereview.chromium.org/2855009
TBR=rafaelw@chromium.org
Review URL: http://codereview.chromium.org/2822021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r-- | chrome/common/extensions/extension.cc | 14 | ||||
-rw-r--r-- | chrome/common/extensions/extension.h | 4 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.h | 3 |
4 files changed, 3 insertions, 20 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 7f7c1bb..d2b3d3b 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -1467,20 +1467,12 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key, return true; } -// static -std::string Extension::ChromeStoreURL() { - std::string gallery_prefix = extension_urls::kGalleryBrowsePrefix; - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL)) - gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kAppsGalleryURL); - return gallery_prefix; -} - GURL Extension::GalleryUrl() const { if (!update_url_.DomainIs("google.com")) return GURL(); - GURL url(ChromeStoreURL() + std::string("/detail/") + id_); + GURL url(std::string(extension_urls::kGalleryBrowsePrefix) + + std::string("/detail/") + id_); return url; } @@ -1628,7 +1620,7 @@ bool Extension::CanExecuteScriptOnHost(const GURL& url, std::string* error) const { // No extensions are allowed to execute script on the gallery because that // would allow extensions to manipulate their own install pages. - if (url.host() == GURL(ChromeStoreURL()).host()) { + if (url.host() == GURL(extension_urls::kGalleryBrowsePrefix).host()) { if (error) *error = errors::kCannotScriptGallery; return false; diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 08654ef..512c7c0 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -213,10 +213,6 @@ class Extension { // it was explictly turned on via a command line switch). static bool AppsAreEnabled(); - // Returns the url prefix for the extension/apps gallery. Can be set via the - // --apps-gallery-url switch. - static std::string ChromeStoreURL(); - // Initialize the extension from a parsed manifest. // Usually, the id of an extension is generated by the "key" property of // its manifest, but if |require_key| is |false|, a temporary ID will be diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc index f80c7e6..be58611 100644 --- a/chrome/common/extensions/extension_constants.cc +++ b/chrome/common/extensions/extension_constants.cc @@ -254,8 +254,6 @@ namespace extension_urls { const char* kGalleryBrowsePrefix = "https://chrome.google.com/extensions"; const char* kGalleryDownloadPrefix = "https://clients2.googleusercontent.com/crx/download"; -const char* kGalleryUpdateURL = - "http://clients2.google.com/service/update2/crx"; const char* kMiniGalleryBrowsePrefix = "https://tools.google.com/chrome/"; const char* kMiniGalleryDownloadPrefix = "https://dl-ssl.google.com/chrome/"; } diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h index 46082c8..c515c72 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -172,9 +172,6 @@ namespace extension_urls { extern const char* kGalleryBrowsePrefix; extern const char* kGalleryDownloadPrefix; - // The update url used by gallery/webstore extensions. - extern const char* kGalleryUpdateURL; - // Same thing for the "minigallery". The minigallery is the temporary static // themes gallery that we put up when we launched themes. extern const char* kMiniGalleryBrowsePrefix; |