- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / safe_browsing / signature_util.h
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.
4 //
5 // Utility functions to check executable signatures for malicious binary
6 // detection.  Each platform has its own implementation of this class.
7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_
10
11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h"
13
14 namespace base {
15 class FilePath;
16 }
17
18 namespace safe_browsing {
19 class ClientDownloadRequest_SignatureInfo;
20
21 class SignatureUtil : public base::RefCountedThreadSafe<SignatureUtil> {
22  public:
23   SignatureUtil();
24
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);
30
31  protected:
32   friend class base::RefCountedThreadSafe<SignatureUtil>;
33   virtual ~SignatureUtil();
34
35  private:
36   DISALLOW_COPY_AND_ASSIGN(SignatureUtil);
37 };
38 }  // namespace safe_browsing
39
40 #endif  // CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_