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

Unified Diff: chrome/browser/safe_browsing/download_protection_service_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/download_protection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index f877e35820330b7806e93d767d36af37963a950c..dd4f5458ac3a58fa2f09fd680afb6d021b3ae639 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
#include <stdint.h>
+
#include <map>
+#include <memory>
#include <string>
#include "base/base_paths.h"
@@ -18,7 +20,6 @@
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -429,9 +430,9 @@ class DownloadProtectionServiceTest : public testing::Test {
base::FilePath testdata_path_;
DownloadProtectionService::ClientDownloadRequestSubscription
client_download_request_subscription_;
- scoped_ptr<ClientDownloadRequest> last_client_download_request_;
+ std::unique_ptr<ClientDownloadRequest> last_client_download_request_;
base::ScopedTempDir profile_dir_;
- scoped_ptr<TestingProfile> profile_;
+ std::unique_ptr<TestingProfile> profile_;
};
@@ -1748,7 +1749,8 @@ TEST_F(DownloadProtectionServiceTest,
base::FilePath final_path(FILE_PATH_LITERAL("a.exe"));
std::string hash = "hash";
- scoped_ptr<content::MockDownloadItem> item(new content::MockDownloadItem);
+ std::unique_ptr<content::MockDownloadItem> item(
+ new content::MockDownloadItem);
EXPECT_CALL(*item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
EXPECT_CALL(*item, GetTargetFilePath())
.WillRepeatedly(ReturnRef(final_path));

Powered by Google App Engine
This is Rietveld 408576698