| 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/browser/safe_browsing/signature_evaluator_mac.h" | 5 #include "chrome/browser/safe_browsing/signature_evaluator_mac.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
| 8 #include <stdint.h> |
| 9 #include <string.h> |
| 8 #include <sys/xattr.h> | 10 #include <sys/xattr.h> |
| 9 | 11 |
| 10 #include <string> | 12 #include <string> |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 13 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 15 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
| 16 #include "base/mac/mac_util.h" | 18 #include "base/mac/mac_util.h" |
| 17 #include "base/mac/scoped_cftyperef.h" | 19 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 std::vector<std::string> xattrs_seen; | 334 std::vector<std::string> xattrs_seen; |
| 333 for (const auto& xattr : mainmenunib->signature().xattr()) { | 335 for (const auto& xattr : mainmenunib->signature().xattr()) { |
| 334 ASSERT_TRUE(xattr.has_key()); | 336 ASSERT_TRUE(xattr.has_key()); |
| 335 EXPECT_TRUE(xattr.has_value()); | 337 EXPECT_TRUE(xattr.has_value()); |
| 336 xattrs_seen.push_back(xattr.key()); | 338 xattrs_seen.push_back(xattr.key()); |
| 337 } | 339 } |
| 338 EXPECT_THAT(xattrs_known, ::testing::ContainerEq(xattrs_seen)); | 340 EXPECT_THAT(xattrs_known, ::testing::ContainerEq(xattrs_seen)); |
| 339 } | 341 } |
| 340 | 342 |
| 341 } // namespace safe_browsing | 343 } // namespace safe_browsing |
| OLD | NEW |