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

Unified Diff: extensions/renderer/module_system_unittest.cc

Issue 1899083003: Convert //extensions/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/mojo/stash_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/module_system_unittest.cc
diff --git a/extensions/renderer/module_system_unittest.cc b/extensions/renderer/module_system_unittest.cc
index f49b3b97a419dfa5e455417e602dfe5e2d4e6004..38756fd3857ccaa8aa13172d0f803496bd76e1b9 100644
--- a/extensions/renderer/module_system_unittest.cc
+++ b/extensions/renderer/module_system_unittest.cc
@@ -6,9 +6,9 @@
#include <stdint.h>
+#include <memory>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "extensions/renderer/module_system_test.h"
#include "gin/modules/module_registry.h"
@@ -56,7 +56,7 @@ TEST_F(ModuleSystemTest, TestExceptionHandling) {
ModuleSystem::NativesEnabledScope natives_enabled_scope(
env()->module_system());
TestExceptionHandler* handler = new TestExceptionHandler;
- scoped_ptr<ModuleSystem::ExceptionHandler> scoped_handler(handler);
+ std::unique_ptr<ModuleSystem::ExceptionHandler> scoped_handler(handler);
ASSERT_FALSE(handler->handled_exception());
env()->module_system()->SetExceptionHandlerForTest(std::move(scoped_handler));
@@ -188,7 +188,7 @@ TEST_F(ModuleSystemTest, TestLazyFieldIsOnlyEvaledOnce) {
env()->module_system());
env()->module_system()->RegisterNativeHandler(
"counter",
- scoped_ptr<NativeHandler>(new CounterNatives(env()->context())));
+ std::unique_ptr<NativeHandler>(new CounterNatives(env()->context())));
env()->RegisterModule("lazy",
"requireNative('counter').Increment();"
"exports.$set('x', 5);");
@@ -243,7 +243,7 @@ TEST_F(ModuleSystemTest, TestModulesOnlyGetEvaledOnce) {
env()->module_system());
env()->module_system()->RegisterNativeHandler(
"counter",
- scoped_ptr<NativeHandler>(new CounterNatives(env()->context())));
+ std::unique_ptr<NativeHandler>(new CounterNatives(env()->context())));
env()->RegisterModule("incrementsWhenEvaled",
"requireNative('counter').Increment();");
@@ -408,7 +408,7 @@ TEST_F(ModuleSystemTest, TestRequireAsyncFromAnotherContext) {
" requireNative('assert').AssertTrue(result == 'pong');"
" });"
"});");
- scoped_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
+ std::unique_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
other_env->RegisterModule("ping",
"define('ping', ['natives'], function(natives) {"
" return function() {"
@@ -445,7 +445,7 @@ TEST_F(ModuleSystemTest, TestRequireAsyncBetweenContexts) {
" requireNative('assert').AssertTrue(result == 'done');"
" });"
"});");
- scoped_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
+ std::unique_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
other_env->RegisterModule("ping",
"define('ping', ['natives'], function(natives) {"
" return function() {"
@@ -477,7 +477,7 @@ TEST_F(ModuleSystemTest, TestRequireAsyncFromContextWithNoModuleRegistry) {
" 'Extension view no longer exists');"
" });"
"});");
- scoped_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
+ std::unique_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
gin::ModuleRegistry::From(env()->context()->v8_context())
->AddBuiltinModule(
env()->isolate(), "natives",
@@ -495,7 +495,7 @@ TEST_F(ModuleSystemTest, TestRequireAsyncFromContextWithNoModuleSystem) {
" requireNative('assert').AssertTrue("
" natives.requireAsync('foo') === undefined);"
"});");
- scoped_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
+ std::unique_ptr<ModuleSystemTestEnvironment> other_env = CreateEnvironment();
gin::ModuleRegistry::From(env()->context()->v8_context())
->AddBuiltinModule(
env()->isolate(), "natives",
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/mojo/stash_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698