| 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/binary_integrity_analy
zer_win.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 if (!signature_info->trusted()) { | 76 if (!signature_info->trusted()) { |
| 77 std::unique_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> | 77 std::unique_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> |
| 78 incident( | 78 incident( |
| 79 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident()); | 79 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident()); |
| 80 | 80 |
| 81 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe()); | 81 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe()); |
| 82 incident->set_allocated_signature(signature_info.release()); | 82 incident->set_allocated_signature(signature_info.release()); |
| 83 | 83 |
| 84 // Send the report. | 84 // Send the report. |
| 85 incident_receiver->AddIncidentForProcess( | 85 incident_receiver->AddIncidentForProcess( |
| 86 base::WrapUnique(new BinaryIntegrityIncident(std::move(incident)))); | 86 base::MakeUnique<BinaryIntegrityIncident>(std::move(incident))); |
| 87 } else { | 87 } else { |
| 88 // The binary is integral, remove previous report so that next incidents | 88 // The binary is integral, remove previous report so that next incidents |
| 89 // for the binary will be reported. | 89 // for the binary will be reported. |
| 90 ClearBinaryIntegrityForFile(incident_receiver.get(), | 90 ClearBinaryIntegrityForFile(incident_receiver.get(), |
| 91 binary_path.BaseName().AsUTF8Unsafe()); | 91 binary_path.BaseName().AsUTF8Unsafe()); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace safe_browsing | 96 } // namespace safe_browsing |
| OLD | NEW |