Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / common / safe_browsing / download_protection_util.h
blob9fc0e3be0697040a0642fbee79019ca719ffcf2f
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_
6 #define CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_
8 #include "chrome/common/safe_browsing/csd.pb.h"
10 namespace base {
11 class FilePath;
14 namespace safe_browsing {
15 namespace download_protection_util {
17 // Returns true if the given file is a supported binary file type.
18 bool IsSupportedBinaryFile(const base::FilePath& file);
20 // Returns true if the given file is a supported archive file type.
21 bool IsArchiveFile(const base::FilePath& file);
23 // Returns the DownloadType of the file at |path|. This function is only valid
24 // for paths that satisfy IsSupportedBinaryFile() above.
25 ClientDownloadRequest::DownloadType GetDownloadType(const base::FilePath& file);
27 // The maximum value returned by GetSBClientDownloadExtensionValueForUMA() + 1.
28 extern const int kSBClientDownloadExtensionsMax;
30 // SBClientDownloadExtensions UMA enum value corresponding to |file|.
31 int GetSBClientDownloadExtensionValueForUMA(const base::FilePath& file);
33 } // namespace download_protection_util
34 } // namespace safe_browsing
36 #endif // CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_