Index: chrome/browser/file_select_helper.cc |
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc |
index c9059e0f6cce84f82d10965ae39240c0ac9cbc27..e4c0d295268c7b10cd72349d8c04c94f81d856cf 100644 |
--- a/chrome/browser/file_select_helper.cc |
+++ b/chrome/browser/file_select_helper.cc |
@@ -25,7 +25,9 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_list.h" |
#include "chrome/browser/ui/chrome_select_file_policy.h" |
+#include "chrome/common/pref_names.h" |
#include "chrome/grit/generated_resources.h" |
+#include "components/prefs/pref_service.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
@@ -529,8 +531,16 @@ void FileSelectHelper::CheckDownloadRequestWithSafeBrowsing( |
} |
GURL requestor_url = params->requestor; |
+ content::BrowserContext* browser_context = web_contents_->GetBrowserContext(); |
+ bool is_incognito = browser_context && browser_context->IsOffTheRecord(); |
+ Profile* profile = Profile::FromBrowserContext(browser_context); |
+ bool is_extended_reporting = |
+ profile && |
+ profile->GetPrefs()->GetBoolean( |
+ prefs::kSafeBrowsingExtendedReportingEnabled); |
sb_service->download_protection_service()->CheckPPAPIDownloadRequest( |
requestor_url, default_file_path, alternate_extensions, |
+ is_extended_reporting, is_incognito, |
asanka
2016/07/14 16:48:15
Since CheckPPAPIDownloadRequest's behavior changes
Jialiu Lin
2016/07/14 20:28:35
Yep, passing the profile is much better. Done.
|
base::Bind(&InterpretSafeBrowsingVerdict, |
base::Bind(&FileSelectHelper::ProceedWithSafeBrowsingVerdict, |
this, default_file_path, base::Passed(¶ms)))); |