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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.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/module_load_analyzer_win_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.cc
index 9ca6a8681c23a1799cd97171a59e0ed13790ff06..fe5e886d560f924d1201eb5d7c7973311eb4243c 100644
--- a/chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/scoped_vector.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -65,18 +66,18 @@ class ModuleLoadAnalayzerTest : public testing::Test {
ASSERT_TRUE(PathService::Get(base::DIR_EXE, &current_dir));
base::ScopedNativeLibrary dll1(current_dir.AppendASCII(module_to_load));
- scoped_ptr<Incident> incident;
+ std::unique_ptr<Incident> incident;
EXPECT_CALL(*mock_incident_receiver_, DoAddIncidentForProcess(_))
.WillOnce(TakeIncident(&incident));
VerifyModuleLoadState(mock_safe_browsing_database_manager_,
- make_scoped_ptr(mock_incident_receiver_));
+ base::WrapUnique(mock_incident_receiver_));
base::RunLoop().RunUntilIdle();
content::RunAllBlockingPoolTasksUntilIdle();
ASSERT_TRUE(incident);
- scoped_ptr<ClientIncidentReport_IncidentData> incident_data =
+ std::unique_ptr<ClientIncidentReport_IncidentData> incident_data =
incident->TakePayload();
ASSERT_TRUE(incident_data->has_suspicious_module());
const ClientIncidentReport_IncidentData_SuspiciousModuleIncident&
@@ -94,7 +95,7 @@ class ModuleLoadAnalayzerTest : public testing::Test {
EXPECT_CALL(*mock_incident_receiver_, DoAddIncidentForProcess(_)).Times(0);
VerifyModuleLoadState(mock_safe_browsing_database_manager_,
- make_scoped_ptr(mock_incident_receiver_));
+ base::WrapUnique(mock_incident_receiver_));
base::RunLoop().RunUntilIdle();
content::RunAllBlockingPoolTasksUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698