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/incident_reporting/binary_integrity_analy
zer_mac.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer_mac.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/mac/bundle_locations.h" | 12 #include "base/mac/bundle_locations.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incid
ent.h" | 14 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incid
ent.h" |
15 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h" | 15 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h" |
16 #include "chrome/browser/safe_browsing/signature_evaluator_mac.h" | 16 #include "chrome/browser/safe_browsing/signature_evaluator_mac.h" |
17 #include "chrome/common/safe_browsing/csd.pb.h" | 17 #include "components/safe_browsing/csd.pb.h" |
18 | 18 |
19 #define DEVELOPER_ID_APPLICATION_OID "field.1.2.840.113635.100.6.1.13" | 19 #define DEVELOPER_ID_APPLICATION_OID "field.1.2.840.113635.100.6.1.13" |
20 #define DEVELOPER_ID_INTERMEDIATE_OID "field.1.2.840.113635.100.6.2.6" | 20 #define DEVELOPER_ID_INTERMEDIATE_OID "field.1.2.840.113635.100.6.2.6" |
21 | 21 |
22 namespace safe_browsing { | 22 namespace safe_browsing { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 void VerifyBinaryIntegrityHelper(IncidentReceiver* incident_receiver, | 26 void VerifyBinaryIntegrityHelper(IncidentReceiver* incident_receiver, |
27 const base::FilePath& path, | 27 const base::FilePath& path, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 std::unique_ptr<IncidentReceiver> incident_receiver) { | 74 std::unique_ptr<IncidentReceiver> incident_receiver) { |
75 size_t i = 0; | 75 size_t i = 0; |
76 for (const auto& p : GetCriticalPathsAndRequirements()) { | 76 for (const auto& p : GetCriticalPathsAndRequirements()) { |
77 base::TimeTicks time_before = base::TimeTicks::Now(); | 77 base::TimeTicks time_before = base::TimeTicks::Now(); |
78 VerifyBinaryIntegrityHelper(incident_receiver.get(), p.path, p.requirement); | 78 VerifyBinaryIntegrityHelper(incident_receiver.get(), p.path, p.requirement); |
79 RecordSignatureVerificationTime(i++, base::TimeTicks::Now() - time_before); | 79 RecordSignatureVerificationTime(i++, base::TimeTicks::Now() - time_before); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 } // namespace | 83 } // namespace |
OLD | NEW |