Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: chrome/browser/extensions/updater/extension_downloader.cc

Issue 10444063: Fix for sync case in code forcing extension updates to use https (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/updater/extension_downloader.cc
diff --git a/chrome/browser/extensions/updater/extension_downloader.cc b/chrome/browser/extensions/updater/extension_downloader.cc
index 918731f488dbcef619357880ed1050be37f84de3..b21b1e1d1e46563e49a3d4886b990976d6f2ae19 100644
--- a/chrome/browser/extensions/updater/extension_downloader.cc
+++ b/chrome/browser/extensions/updater/extension_downloader.cc
@@ -150,13 +150,8 @@ bool ExtensionDownloader::AddExtension(const Extension& extension) {
if (!extension.UpdatesFromGallery())
update_url_data = delegate_->GetUpdateUrlData(extension.id());
- // Make sure we use SSL for store-hosted extensions.
- GURL update_url = extension.update_url();
- if (extension.UpdatesFromGallery() && !update_url.SchemeIsSecure())
- update_url = extension_urls::GetWebstoreUpdateUrl();
-
return AddExtensionData(extension.id(), *extension.version(),
- extension.GetType(), update_url,
+ extension.GetType(), extension.update_url(),
update_url_data);
}
@@ -211,14 +206,10 @@ bool ExtensionDownloader::AddExtensionData(const std::string& id,
return false;
}
- // Double-check that we're using https for webstore urls.
+ // Make sure we use SSL for store-hosted extensions.
if (extension_urls::IsWebstoreUpdateUrl(update_url) &&
- !update_url.SchemeIsSecure() &&
- extension_urls::GetWebstoreUpdateUrl().SchemeIsSecure()) {
- NOTREACHED() << "Refusing to send non-secure update check for " << id
- << " (" << update_url.spec() << ")";
- return false;
- }
+ !update_url.SchemeIsSecure())
+ update_url = extension_urls::GetWebstoreUpdateUrl();
// Skip extensions with empty IDs.
if (id.empty()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698