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

Unified Diff: chrome/browser/safe_browsing/unverified_download_policy.h

Issue 1410423003: [SafeBrowsing] Conditionalize unverified download blocking on whitelist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flash-download-block
Patch Set: Created 5 years, 1 month 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/file_select_helper.cc ('k') | chrome/browser/safe_browsing/unverified_download_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/unverified_download_policy.h
diff --git a/chrome/browser/safe_browsing/unverified_download_policy.h b/chrome/browser/safe_browsing/unverified_download_policy.h
index 081a070082d3bbc70dad1fff5dbad1d366bd06e5..170e92bfe8d57d2cb2d7342131813ee49c3f8dbb 100644
--- a/chrome/browser/safe_browsing/unverified_download_policy.h
+++ b/chrome/browser/safe_browsing/unverified_download_policy.h
@@ -5,15 +5,27 @@
#ifndef CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
#define CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
+#include "base/callback_forward.h"
+
+class GURL;
+
namespace base {
class FilePath;
}
namespace safe_browsing {
-// Returns true if |file| is allowed to be downloaded without invoking
-// SafeBrowsing to verify the contents and source URL.
-bool IsUnverifiedDownloadAllowed(const base::FilePath& file);
+enum class UnverifiedDownloadPolicy { ALLOWED, DISALLOWED };
+
+using UnverifiedDownloadCheckCompletionCallback =
+ base::Callback<void(UnverifiedDownloadPolicy)>;
+
+// Invokes |callback| on the current thread with the effective download policy
+// for an unverified download of |file| by |requestor|.
+void CheckUnverifiedDownloadPolicy(
+ const GURL& requestor,
+ const base::FilePath& file,
+ const UnverifiedDownloadCheckCompletionCallback& callback);
} // namespace safe_browsing
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/safe_browsing/unverified_download_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698