| 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/utility/safe_browsing/mac/dmg_analyzer.h" | 5 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 15 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
| 16 #include "chrome/common/safe_browsing/csd.pb.h" | |
| 17 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" | 16 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" |
| 18 #include "chrome/utility/safe_browsing/mac/dmg_iterator.h" | 17 #include "chrome/utility/safe_browsing/mac/dmg_iterator.h" |
| 19 #include "chrome/utility/safe_browsing/mac/read_stream.h" | 18 #include "chrome/utility/safe_browsing/mac/read_stream.h" |
| 19 #include "components/safe_browsing/csd.pb.h" |
| 20 #include "crypto/secure_hash.h" | 20 #include "crypto/secure_hash.h" |
| 21 #include "crypto/sha2.h" | 21 #include "crypto/sha2.h" |
| 22 | 22 |
| 23 namespace safe_browsing { | 23 namespace safe_browsing { |
| 24 namespace dmg { | 24 namespace dmg { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // MachOFeatureExtractor examines files to determine if they are Mach-O, and, | 28 // MachOFeatureExtractor examines files to determine if they are Mach-O, and, |
| 29 // if so, it uses the BinaryFeatureExtractor to obtain information about the | 29 // if so, it uses the BinaryFeatureExtractor to obtain information about the |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } else { | 143 } else { |
| 144 results->archived_binary.RemoveLast(); | 144 results->archived_binary.RemoveLast(); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 results->success = true; | 148 results->success = true; |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace dmg | 151 } // namespace dmg |
| 152 } // namespace safe_browsing | 152 } // namespace safe_browsing |
| OLD | NEW |