Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Unified Diff: chrome/browser/safe_browsing/binary_feature_extractor.h

Issue 1015363003: Move BinaryFeatureExtractor and PEImageReader to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zip2
Patch Set: sync to position 321353 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/binary_feature_extractor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/binary_feature_extractor.h
diff --git a/chrome/browser/safe_browsing/binary_feature_extractor.h b/chrome/browser/safe_browsing/binary_feature_extractor.h
deleted file mode 100644
index 4d98a1647d0882f80a71be7a1867a8bd948a9d57..0000000000000000000000000000000000000000
--- a/chrome/browser/safe_browsing/binary_feature_extractor.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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.
-//
-// Utility functions to extract file features for malicious binary detection.
-// Each platform has its own implementation of this class.
-
-#ifndef CHROME_BROWSER_SAFE_BROWSING_BINARY_FEATURE_EXTRACTOR_H_
-#define CHROME_BROWSER_SAFE_BROWSING_BINARY_FEATURE_EXTRACTOR_H_
-
-#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
-
-namespace base {
-class FilePath;
-}
-
-namespace safe_browsing {
-class ClientDownloadRequest_Digests;
-class ClientDownloadRequest_ImageHeaders;
-class ClientDownloadRequest_SignatureInfo;
-
-class BinaryFeatureExtractor
- : public base::RefCountedThreadSafe<BinaryFeatureExtractor> {
- public:
- // The type and defined values for a bitfield that controls aspects of image
- // header extraction.
- typedef uint32_t ExtractHeadersOption;
- static const ExtractHeadersOption kDefaultOptions = 0;
- static const ExtractHeadersOption kOmitExports = 1U << 0;
-
- BinaryFeatureExtractor();
-
- // Fills in the DownloadRequest_SignatureInfo for the given file path.
- // This method may be called on any thread.
- virtual void CheckSignature(
- const base::FilePath& file_path,
- ClientDownloadRequest_SignatureInfo* signature_info);
-
- // Populates |image_headers| with the PE image headers of |file_path|.
- // |options| is a bitfield controlling aspects of extraction. Returns true if
- // |image_headers| is populated with any information.
- virtual bool ExtractImageHeaders(
- const base::FilePath& file_path,
- ExtractHeadersOption options,
- ClientDownloadRequest_ImageHeaders* image_headers);
-
- // Populates |digests.sha256| with the SHA256 digest of |file_path|.
- virtual void ExtractDigest(const base::FilePath& file_path,
- ClientDownloadRequest_Digests* digests);
-
- protected:
- friend class base::RefCountedThreadSafe<BinaryFeatureExtractor>;
- virtual ~BinaryFeatureExtractor();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BinaryFeatureExtractor);
-};
-} // namespace safe_browsing
-
-#endif // CHROME_BROWSER_SAFE_BROWSING_BINARY_FEATURE_EXTRACTOR_H_
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/binary_feature_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698