OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/incident_reporting/environment_data_colle
ction_win.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/environment_data_colle
ction_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/base_paths.h" | 13 #include "base/base_paths.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/scoped_native_library.h" | 16 #include "base/scoped_native_library.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/test/test_reg_util_win.h" | 18 #include "base/test/test_reg_util_win.h" |
19 #include "base/win/registry.h" | 19 #include "base/win/registry.h" |
20 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt
est_util_win.h" | 20 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt
est_util_win.h" |
21 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif
ier_win.h" | 21 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif
ier_win.h" |
22 #include "chrome/browser/safe_browsing/path_sanitizer.h" | 22 #include "chrome/browser/safe_browsing/path_sanitizer.h" |
23 #include "chrome/common/safe_browsing/csd.pb.h" | |
24 #include "chrome_elf/chrome_elf_constants.h" | 23 #include "chrome_elf/chrome_elf_constants.h" |
| 24 #include "components/safe_browsing/csd.pb.h" |
25 #include "net/base/winsock_init.h" | 25 #include "net/base/winsock_init.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 namespace safe_browsing { | 28 namespace safe_browsing { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Returns true if a dll with filename |dll_name| is found in |process_report|, | 32 // Returns true if a dll with filename |dll_name| is found in |process_report|, |
33 // providing a copy of it in |result|. | 33 // providing a copy of it in |result|. |
34 bool GetProcessReportDll( | 34 bool GetProcessReportDll( |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 TEST(SafeBrowsingEnvironmentDataCollectionWinTest, | 263 TEST(SafeBrowsingEnvironmentDataCollectionWinTest, |
264 CollectDomainEnrollmentData) { | 264 CollectDomainEnrollmentData) { |
265 // The test may or may not be running on a domain-enrolled machine, so all we | 265 // The test may or may not be running on a domain-enrolled machine, so all we |
266 // can check is that some value is filled in. | 266 // can check is that some value is filled in. |
267 ClientIncidentReport_EnvironmentData_OS os_data; | 267 ClientIncidentReport_EnvironmentData_OS os_data; |
268 CollectDomainEnrollmentData(&os_data); | 268 CollectDomainEnrollmentData(&os_data); |
269 EXPECT_TRUE(os_data.has_is_enrolled_to_domain()); | 269 EXPECT_TRUE(os_data.has_is_enrolled_to_domain()); |
270 } | 270 } |
271 | 271 |
272 } // namespace safe_browsing | 272 } // namespace safe_browsing |
OLD | NEW |