| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 5 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "chrome/common/safe_browsing/csd.pb.h" | |
| 11 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" | 10 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" |
| 11 #include "components/safe_browsing/csd.pb.h" |
| 12 | 12 |
| 13 namespace safe_browsing { | 13 namespace safe_browsing { |
| 14 | 14 |
| 15 bool BinaryFeatureExtractor::ExtractImageFeaturesFromData( | 15 bool BinaryFeatureExtractor::ExtractImageFeaturesFromData( |
| 16 const uint8_t* data, size_t data_size, | 16 const uint8_t* data, size_t data_size, |
| 17 ExtractHeadersOption options, | 17 ExtractHeadersOption options, |
| 18 ClientDownloadRequest_ImageHeaders* image_headers, | 18 ClientDownloadRequest_ImageHeaders* image_headers, |
| 19 google::protobuf::RepeatedPtrField<std::string>* signed_data) { | 19 google::protobuf::RepeatedPtrField<std::string>* signed_data) { |
| 20 MachOImageReader image_reader; | 20 MachOImageReader image_reader; |
| 21 if (!image_reader.Initialize(data, data_size)) | 21 if (!image_reader.Initialize(data, data_size)) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 reinterpret_cast<const char*>(&code_signature[0]), | 59 reinterpret_cast<const char*>(&code_signature[0]), |
| 60 code_signature.size()); | 60 code_signature.size()); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 return true; | 65 return true; |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace safe_browsing | 68 } // namespace safe_browsing |
| OLD | NEW |