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

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

Issue 2943763002: Add a new group policy to disable safe browsing for files downloaded from trusted sources. (Closed)
Patch Set: D'Ho! Created 3 years, 6 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/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 15e6f80f5774e1f4ca7dd9f33b26e375df960c3b..e6343383bd44cc1a2fcd12fe5d7b0430c3de38a1 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -340,6 +340,11 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
const base::Closure& internal_complete_callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
#if defined(FULL_SAFE_BROWSING)
+ if (!download_prefs_->safebrowsing_for_trusted_sources_enabled() &&
+ download_prefs_->IsFromTrustedSource(*item)) {
+ return true;
+ }
+
SafeBrowsingState* state = static_cast<SafeBrowsingState*>(
item->GetUserData(&kSafeBrowsingUserDataKey));
if (!state) {

Powered by Google App Engine
This is Rietveld 408576698