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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc
index ab34959befaac01f1fd4abaceb976be88c5356c0..e1e2e2dc10ab0141d0c047dd7bc414c8f1a660a2 100644
--- a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.cc
@@ -10,6 +10,7 @@
#include "base/files/file_util.h"
#include "base/mac/bundle_locations.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h"
#include "chrome/browser/safe_browsing/signature_evaluator_mac.h"
@@ -31,11 +32,11 @@ void VerifyBinaryIntegrityHelper(IncidentReceiver* incident_receiver,
return;
}
- scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
+ std::unique_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
incident(new ClientIncidentReport_IncidentData_BinaryIntegrityIncident());
if (!evaluator.PerformEvaluation(incident.get())) {
incident_receiver->AddIncidentForProcess(
- make_scoped_ptr(new BinaryIntegrityIncident(std::move(incident))));
+ base::WrapUnique(new BinaryIntegrityIncident(std::move(incident))));
} else {
// Clear past incidents involving this bundle if the signature is
// now valid.
@@ -69,7 +70,8 @@ void VerifyBinaryIntegrityForTesting(IncidentReceiver* incident_receiver,
VerifyBinaryIntegrityHelper(incident_receiver, path, requirement);
}
-void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver) {
+void VerifyBinaryIntegrity(
+ std::unique_ptr<IncidentReceiver> incident_receiver) {
size_t i = 0;
for (const auto& p : GetCriticalPathsAndRequirements()) {
base::TimeTicks time_before = base::TimeTicks::Now();

Powered by Google App Engine
This is Rietveld 408576698