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

Unified Diff: extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc
diff --git a/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc b/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc
index ebba7bcc1a95353e88e84b2a9f3ec4119f253960..5d4e4b4993451261c8ac8e51750e4aeb29fe1e16 100644
--- a/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc
+++ b/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc
@@ -2,12 +2,15 @@
// 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 "extensions/browser/api/sockets_udp/sockets_udp_api.h"
+
+#include <memory>
+
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "extensions/browser/api/api_resource_manager.h"
#include "extensions/browser/api/socket/socket.h"
#include "extensions/browser/api/socket/udp_socket.h"
-#include "extensions/browser/api/sockets_udp/sockets_udp_api.h"
#include "extensions/browser/api_unittest.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -15,9 +18,9 @@
namespace extensions {
namespace api {
-static scoped_ptr<KeyedService> ApiResourceManagerTestFactory(
+static std::unique_ptr<KeyedService> ApiResourceManagerTestFactory(
content::BrowserContext* context) {
- return make_scoped_ptr(new ApiResourceManager<ResumableUDPSocket>(context));
+ return base::WrapUnique(new ApiResourceManager<ResumableUDPSocket>(context));
}
class SocketsUdpUnitTest : public ApiUnitTest {
@@ -41,7 +44,7 @@ TEST_F(SocketsUdpUnitTest, 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());
}
« no previous file with comments | « extensions/browser/api/sockets_udp/sockets_udp_api.cc ('k') | extensions/browser/api/sockets_udp/sockets_udp_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698