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

Unified Diff: chrome/browser/download/download_crx_util.cc

Issue 10387167: Revert 137540 - Disable off-store extension installs by default. Also get rid of ExtensionService::… (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 | « chrome/browser/download/download_crx_util.h ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_crx_util.cc
===================================================================
--- chrome/browser/download/download_crx_util.cc (revision 137574)
+++ chrome/browser/download/download_crx_util.cc (working copy)
@@ -51,6 +51,15 @@
mock_install_ui_for_testing = mock_ui;
}
+bool ShouldOpenExtensionDownload(const DownloadItem& download_item) {
+ if (extensions::switch_utils::IsOffStoreInstallEnabled() ||
+ WebstoreInstaller::GetAssociatedApproval(download_item)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
scoped_refptr<CrxInstaller> OpenChromeExtension(
Profile* profile,
const DownloadItem& download_item) {
@@ -71,8 +80,8 @@
installer->InstallUserScript(download_item.GetFullPath(),
download_item.GetURL());
} else {
- bool is_gallery_download =
- WebstoreInstaller::GetAssociatedApproval(download_item) != NULL;
+ bool is_gallery_download = service->IsDownloadFromGallery(
+ download_item.GetURL(), download_item.GetReferrerUrl());
installer->set_original_mime_type(download_item.GetOriginalMimeType());
installer->set_apps_require_extension_mime_type(true);
installer->set_download_url(download_item.GetURL());
« no previous file with comments | « chrome/browser/download/download_crx_util.h ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698