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. 4 5#ifndef CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_ 6#define CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_ 7 8#include "chrome/common/safe_browsing/csd.pb.h" 9 10namespace base { 11class FilePath; 12} 13 14namespace safe_browsing { 15namespace download_protection_util { 16 17// Returns true if the given file is a supported binary file type. 18bool IsBinaryFile(const base::FilePath& file); 19 20// Returns true if the given file is a supported archive file type. 21bool IsArchiveFile(const base::FilePath& file); 22 23// Returns the DownloadType of the file at |path|. This function is only valid 24// for paths that satisfy IsBinaryFile() above. 25ClientDownloadRequest::DownloadType GetDownloadType(const base::FilePath& file); 26 27} // namespace download_protection_util 28} // namespace safe_browsing 29 30#endif // CHROME_COMMON_SAFE_BROWSING_DOWNLOAD_PROTECTION_UTIL_H_ 31