Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win.cc

Issue 2259523003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698