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

Unified Diff: components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc

Issue 1873263002: Convert //components/data_reduction_proxy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback 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: components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
diff --git a/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc b/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
index fff7ddfd7a716d9790a70ea07c32e57d19bdbcce..8d8be306042a778f3d2c7b59302036e73ff1c364 100644
--- a/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
+++ b/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
@@ -6,10 +6,11 @@
#include <stddef.h>
+#include <memory>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "content/public/browser/browser_thread.h"
@@ -49,7 +50,8 @@ class ContentLoFiUIServiceTest : public content::RenderViewHostTestHarness {
base::Bind(&ContentLoFiUIServiceTest::OnLoFiResponseReceivedCallback,
base::Unretained(this))));
- scoped_ptr<net::URLRequest> request = CreateRequest(context, &delegate);
+ std::unique_ptr<net::URLRequest> request =
+ CreateRequest(context, &delegate);
content_lofi_ui_service_->OnLoFiReponseReceived(*request, is_preview);
@@ -58,13 +60,13 @@ class ContentLoFiUIServiceTest : public content::RenderViewHostTestHarness {
base::Bind(&base::RunLoop::Quit, base::Unretained(ui_run_loop)));
}
- scoped_ptr<net::URLRequest> CreateRequest(
+ std::unique_ptr<net::URLRequest> CreateRequest(
const net::TestURLRequestContext& context,
net::TestDelegate* delegate) {
EXPECT_TRUE(
content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
- scoped_ptr<net::URLRequest> request = context.CreateRequest(
+ std::unique_ptr<net::URLRequest> request = context.CreateRequest(
GURL("http://www.google.com/"), net::IDLE, delegate);
content::ResourceRequestInfo::AllocateForTesting(
@@ -96,7 +98,7 @@ class ContentLoFiUIServiceTest : public content::RenderViewHostTestHarness {
}
private:
- scoped_ptr<ContentLoFiUIService> content_lofi_ui_service_;
+ std::unique_ptr<ContentLoFiUIService> content_lofi_ui_service_;
bool callback_called_;
bool is_preview_;
};

Powered by Google App Engine
This is Rietveld 408576698