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

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

Issue 999003003: Include attributes of zipped binaries in ClientDownloadRequests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zip2
Patch Set: fix ordering of SandboxedZipAnalyzer methods 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
Index: chrome/common/safe_browsing/binary_feature_extractor.h
diff --git a/chrome/common/safe_browsing/binary_feature_extractor.h b/chrome/common/safe_browsing/binary_feature_extractor.h
index 73eadbf54eef5264eecebc669a192b2c5a8f43c1..e8bc9a1f61f48f10cb497ff943517b8d0a6a353d 100644
--- a/chrome/common/safe_browsing/binary_feature_extractor.h
+++ b/chrome/common/safe_browsing/binary_feature_extractor.h
@@ -9,6 +9,7 @@
#define CHROME_COMMON_SAFE_BROWSING_BINARY_FEATURE_EXTRACTOR_H_
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/memory/ref_counted.h"
namespace base {
@@ -45,6 +46,13 @@ class BinaryFeatureExtractor
ExtractHeadersOption options,
ClientDownloadRequest_ImageHeaders* image_headers);
+ // As above, but works with an already-opened file. BinaryFeatureExtractor
+ // takes ownership of |file| and closes it when done.
+ virtual bool ExtractImageHeadersFromFile(
+ base::File file,
+ 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);

Powered by Google App Engine
This is Rietveld 408576698