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

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

Issue 10399069: Reland 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
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index a34ebecc316194cb969a4628ac65f3533cd9389d..8711140c92acfaa549040c6963df0fe8bada1b1e 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -51,15 +51,6 @@ void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui) {
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) {
@@ -80,8 +71,8 @@ scoped_refptr<CrxInstaller> OpenChromeExtension(
installer->InstallUserScript(download_item.GetFullPath(),
download_item.GetURL());
} else {
- bool is_gallery_download = service->IsDownloadFromGallery(
- download_item.GetURL(), download_item.GetReferrerUrl());
+ bool is_gallery_download =
+ WebstoreInstaller::GetAssociatedApproval(download_item) != NULL;
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