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

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

Issue 10356052: Disable off-store extension installs by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: argh 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
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..af6cb5d3e637ee4f41b874fddd66bb6a99a63b96 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -51,9 +51,11 @@ void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui) {
mock_install_ui_for_testing = mock_ui;
}
-bool ShouldOpenExtensionDownload(const DownloadItem& download_item) {
+bool ShouldOpenExtensionDownload(ExtensionService* service,
+ const DownloadItem& download_item) {
if (extensions::switch_utils::IsOffStoreInstallEnabled() ||
- WebstoreInstaller::GetAssociatedApproval(download_item)) {
+ (service && service->IsDownloadFromGallery(
+ download_item.GetURL(), download_item.GetReferrerUrl()))) {
return true;
} else {
return false;

Powered by Google App Engine
This is Rietveld 408576698