diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 22:37:59 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 22:37:59 +0000 |
commit | 3abfed2bbbeb333a4331ecf2facf2eef8ad72024 (patch) | |
tree | 4755eb72e0410e861b01079d0687f644ca1d0007 /chrome/common/extensions/extension_constants.cc | |
parent | 5fc24d65a5d958d4416f00083cadb16723335bc7 (diff) | |
download | chromium_src-3abfed2bbbeb333a4331ecf2facf2eef8ad72024.zip chromium_src-3abfed2bbbeb333a4331ecf2facf2eef8ad72024.tar.gz chromium_src-3abfed2bbbeb333a4331ecf2facf2eef8ad72024.tar.bz2 |
Revert r139371 and r138961
These seem to be causing crashes at startup for some users.
TBR=asargent@chromium.org
BUG=130881
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10532037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_constants.cc')
-rw-r--r-- | chrome/common/extensions/extension_constants.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc index 3fa1f32..338342d 100644 --- a/chrome/common/extensions/extension_constants.cc +++ b/chrome/common/extensions/extension_constants.cc @@ -43,6 +43,8 @@ GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) { return GURL(GetWebstoreLaunchURL() + "/inlineinstall/detail/" + extension_id); } +const char kGalleryUpdateHttpUrl[] = + "http://clients2.google.com/service/update2/crx"; const char kGalleryUpdateHttpsUrl[] = "https://clients2.google.com/service/update2/crx"; // TODO(battre): Delete the HTTP URL once the blacklist is downloaded via HTTPS. @@ -51,22 +53,17 @@ const char kExtensionBlocklistUrlPrefix[] = const char kExtensionBlocklistHttpsUrlPrefix[] = "https://www.gstatic.com/chrome/extensions/blacklist"; -GURL GetWebstoreUpdateUrl() { +GURL GetWebstoreUpdateUrl(bool secure) { CommandLine* cmdline = CommandLine::ForCurrentProcess(); if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL)) return GURL(cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL)); else - return GURL(kGalleryUpdateHttpsUrl); + return GURL(secure ? kGalleryUpdateHttpsUrl : kGalleryUpdateHttpUrl); } bool IsWebstoreUpdateUrl(const GURL& update_url) { - GURL store_url = GetWebstoreUpdateUrl(); - if (update_url == store_url) { - return true; - } else { - return (update_url.host() == store_url.host() && - update_url.path() == store_url.path()); - } + return update_url == GetWebstoreUpdateUrl(false) || + update_url == GetWebstoreUpdateUrl(true); } bool IsBlacklistUpdateUrl(const GURL& url) { |