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/mach_o_image_reader_mac.h" | 5 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" |
6 | 6 |
7 #include <arpa/inet.h> | 7 #include <arpa/inet.h> |
8 #include <libkern/OSByteOrder.h> | 8 #include <libkern/OSByteOrder.h> |
9 #include <mach-o/fat.h> | 9 #include <mach-o/fat.h> |
10 #include <mach-o/loader.h> | 10 #include <mach-o/loader.h> |
| 11 #include <stddef.h> |
| 12 #include <stdint.h> |
11 #include <string.h> | 13 #include <string.h> |
12 #include <uuid/uuid.h> | 14 #include <uuid/uuid.h> |
13 | 15 |
14 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
15 #include "base/files/memory_mapped_file.h" | 17 #include "base/files/memory_mapped_file.h" |
16 #include "base/path_service.h" | 18 #include "base/path_service.h" |
17 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
19 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 EXPECT_EQ(3u, load_commands.size()); | 478 EXPECT_EQ(3u, load_commands.size()); |
477 | 479 |
478 EXPECT_EQ(static_cast<uint32_t>(LC_SEGMENT), load_commands[0].cmd()); | 480 EXPECT_EQ(static_cast<uint32_t>(LC_SEGMENT), load_commands[0].cmd()); |
479 EXPECT_EQ(static_cast<uint32_t>(LC_SYMSEG), load_commands[1].cmd()); | 481 EXPECT_EQ(static_cast<uint32_t>(LC_SYMSEG), load_commands[1].cmd()); |
480 EXPECT_EQ(sizeof(load_command) - 3, load_commands[1].cmdsize()); | 482 EXPECT_EQ(sizeof(load_command) - 3, load_commands[1].cmdsize()); |
481 EXPECT_EQ(static_cast<uint32_t>(LC_SEGMENT), load_commands[2].cmd()); | 483 EXPECT_EQ(static_cast<uint32_t>(LC_SEGMENT), load_commands[2].cmd()); |
482 } | 484 } |
483 | 485 |
484 } // namespace | 486 } // namespace |
485 } // namespace safe_browsing | 487 } // namespace safe_browsing |
OLD | NEW |