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

Unified Diff: chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
diff --git a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
index 15b26bb895966bc80bf3e997fbf7de16df348d00..38add751841116160ac32f67469bfb57d1e922a3 100644
--- a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
+++ b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/extensions/extension_api_unittest.h"
@@ -19,14 +21,14 @@
namespace extensions {
namespace api {
-static scoped_ptr<KeyedService> ApiResourceManagerTestFactory(
+static std::unique_ptr<KeyedService> ApiResourceManagerTestFactory(
content::BrowserContext* context) {
- return make_scoped_ptr(new ApiResourceManager<ResumableTCPSocket>(context));
+ return base::WrapUnique(new ApiResourceManager<ResumableTCPSocket>(context));
}
-static scoped_ptr<KeyedService> ApiResourceManagerTestServerFactory(
+static std::unique_ptr<KeyedService> ApiResourceManagerTestServerFactory(
content::BrowserContext* context) {
- return make_scoped_ptr(
+ return base::WrapUnique(
new ApiResourceManager<ResumableTCPServerSocket>(context));
}
@@ -56,7 +58,7 @@ TEST_F(SocketsTcpServerUnitTest, Create) {
function->set_work_thread_id(id);
// Run tests
- scoped_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
+ std::unique_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
function, "[{\"persistent\": true, \"name\": \"foo\"}]"));
ASSERT_TRUE(result.get());
}

Powered by Google App Engine
This is Rietveld 408576698