1 // Copyright (c) 2011 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 // Utility functions to check executable signatures for malicious binary
6 // detection. Each platform has its own implementation of this class.
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_
11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h"
18 namespace safe_browsing
{
19 class ClientDownloadRequest_SignatureInfo
;
21 class SignatureUtil
: public base::RefCountedThreadSafe
<SignatureUtil
> {
25 // Fills in the DownloadRequest_SignatureInfo for the given file path.
26 // This method may be called on any thread.
27 virtual void CheckSignature(
28 const base::FilePath
& file_path
,
29 ClientDownloadRequest_SignatureInfo
* signature_info
);
32 friend class base::RefCountedThreadSafe
<SignatureUtil
>;
33 virtual ~SignatureUtil();
36 DISALLOW_COPY_AND_ASSIGN(SignatureUtil
);
38 } // namespace safe_browsing
40 #endif // CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_