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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host_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/client_side_detection_host_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index f025b295859823dee2aacaf73cf34f823e37e9de..80e8d051da8deb2ef5654c69bea1b828a73b7505 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -4,13 +4,13 @@
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
+#include <memory>
#include <tuple>
#include <utility>
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
@@ -99,13 +99,13 @@ ACTION(QuitUIMessageLoop) {
}
ACTION_P(InvokeDoneCallback, verdict) {
- scoped_ptr<ClientPhishingRequest> request(::std::tr1::get<1>(args));
+ std::unique_ptr<ClientPhishingRequest> request(::std::tr1::get<1>(args));
request->CopyFrom(*verdict);
::std::tr1::get<2>(args).Run(true, std::move(request));
}
ACTION_P(InvokeMalwareCallback, verdict) {
- scoped_ptr<ClientMalwareRequest> request(::std::tr1::get<1>(args));
+ std::unique_ptr<ClientMalwareRequest> request(::std::tr1::get<1>(args));
request->CopyFrom(*verdict);
::std::tr1::get<2>(args).Run(true, std::move(request));
}
@@ -438,8 +438,8 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness {
}
protected:
- scoped_ptr<ClientSideDetectionHost> csd_host_;
- scoped_ptr<StrictMock<MockClientSideDetectionService> > csd_service_;
+ std::unique_ptr<ClientSideDetectionHost> csd_host_;
+ std::unique_ptr<StrictMock<MockClientSideDetectionService>> csd_service_;
scoped_refptr<StrictMock<MockSafeBrowsingUIManager> > ui_manager_;
scoped_refptr<StrictMock<MockSafeBrowsingDatabaseManager> > database_manager_;
MockTestingProfile* mock_profile_; // We don't own this object

Powered by Google App Engine
This is Rietveld 408576698