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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
7 7
8 #include "base/callback_forward.h"
9
10 class GURL;
11
8 namespace base { 12 namespace base {
9 class FilePath; 13 class FilePath;
10 } 14 }
11 15
12 namespace safe_browsing { 16 namespace safe_browsing {
13 17
14 // Returns true if |file| is allowed to be downloaded without invoking 18 enum class UnverifiedDownloadPolicy { ALLOWED, DISALLOWED };
15 // SafeBrowsing to verify the contents and source URL. 19
16 bool IsUnverifiedDownloadAllowed(const base::FilePath& file); 20 using UnverifiedDownloadCheckCompletionCallback =
21 base::Callback<void(UnverifiedDownloadPolicy)>;
22
23 // Invokes |callback| on the current thread with the effective download policy
24 // for an unverified download of |file| by |requestor|.
25 void CheckUnverifiedDownloadPolicy(
26 const GURL& requestor,
27 const base::FilePath& file,
28 const UnverifiedDownloadCheckCompletionCallback& callback);
17 29
18 } // namespace safe_browsing 30 } // namespace safe_browsing
19 31
20 #endif // CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_ 32 #endif // CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
OLDNEW
« 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