| Index: chrome/common/extensions/extension_constants.cc
|
| diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
|
| index 14242a8862f8dce45bb37c28c120f1266fcaba0f..4a6f8eda53b4c8ff5641a70afda2fac0c0ab0372 100644
|
| --- a/chrome/common/extensions/extension_constants.cc
|
| +++ b/chrome/common/extensions/extension_constants.cc
|
| @@ -44,8 +44,6 @@ 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.
|
| @@ -54,17 +52,22 @@ const char kExtensionBlocklistUrlPrefix[] =
|
| const char kExtensionBlocklistHttpsUrlPrefix[] =
|
| "https://www.gstatic.com/chrome/extensions/blacklist";
|
|
|
| -GURL GetWebstoreUpdateUrl(bool secure) {
|
| +GURL GetWebstoreUpdateUrl() {
|
| CommandLine* cmdline = CommandLine::ForCurrentProcess();
|
| if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL))
|
| return GURL(cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL));
|
| else
|
| - return GURL(secure ? kGalleryUpdateHttpsUrl : kGalleryUpdateHttpUrl);
|
| + return GURL(kGalleryUpdateHttpsUrl);
|
| }
|
|
|
| bool IsWebstoreUpdateUrl(const GURL& update_url) {
|
| - return update_url == GetWebstoreUpdateUrl(false) ||
|
| - update_url == GetWebstoreUpdateUrl(true);
|
| + 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());
|
| + }
|
| }
|
|
|
| bool IsBlacklistUpdateUrl(const GURL& url) {
|
|
|