blob: e5001db575265726c67131e2ee29c744838eb7ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
#define CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
#include <vector>
#include "base/callback_forward.h"
#include "base/files/file_path.h"
class GURL;
namespace safe_browsing {
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|. If it is possible for
// the file to be downloaded with alternate file extensions, they should be
// specified in |alternate_extensions|.
void CheckUnverifiedDownloadPolicy(
const GURL& requestor,
const base::FilePath& file,
const std::vector<base::FilePath::StringType>& alternate_extensions,
const UnverifiedDownloadCheckCompletionCallback& callback);
} // namespace safe_browsing
#endif // CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_POLICY_H_
|