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

Unified Diff: webrtc/base/thread_unittest.cc

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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 | « webrtc/base/thread_checker_unittest.cc ('k') | webrtc/base/virtualsocket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/thread_unittest.cc
diff --git a/webrtc/base/thread_unittest.cc b/webrtc/base/thread_unittest.cc
index 7889e29da8d2cd2c83fbe6f394f1a79b704e258c..d7330581780fce23ab87d0eb27824cc3276581c1 100644
--- a/webrtc/base/thread_unittest.cc
+++ b/webrtc/base/thread_unittest.cc
@@ -589,17 +589,18 @@ class GuardedAsyncInvokeTest : public testing::Test {
// Functor for creating an invoker.
struct CreateInvoker {
- CreateInvoker(scoped_ptr<GuardedAsyncInvoker>* invoker) : invoker_(invoker) {}
+ CreateInvoker(std::unique_ptr<GuardedAsyncInvoker>* invoker)
+ : invoker_(invoker) {}
void operator()() { invoker_->reset(new GuardedAsyncInvoker()); }
- scoped_ptr<GuardedAsyncInvoker>* invoker_;
+ std::unique_ptr<GuardedAsyncInvoker>* invoker_;
};
// Test that we can call AsyncInvoke<void>() after the thread died.
TEST_F(GuardedAsyncInvokeTest, KillThreadFireAndForget) {
// Create and start the thread.
- scoped_ptr<Thread> thread(new Thread());
+ std::unique_ptr<Thread> thread(new Thread());
thread->Start();
- scoped_ptr<GuardedAsyncInvoker> invoker;
+ std::unique_ptr<GuardedAsyncInvoker> invoker;
// Create the invoker on |thread|.
thread->Invoke<void>(CreateInvoker(&invoker));
// Kill |thread|.
@@ -615,9 +616,9 @@ TEST_F(GuardedAsyncInvokeTest, KillThreadFireAndForget) {
// Test that we can call AsyncInvoke with callback after the thread died.
TEST_F(GuardedAsyncInvokeTest, KillThreadWithCallback) {
// Create and start the thread.
- scoped_ptr<Thread> thread(new Thread());
+ std::unique_ptr<Thread> thread(new Thread());
thread->Start();
- scoped_ptr<GuardedAsyncInvoker> invoker;
+ std::unique_ptr<GuardedAsyncInvoker> invoker;
// Create the invoker on |thread|.
thread->Invoke<void>(CreateInvoker(&invoker));
// Kill |thread|.
« no previous file with comments | « webrtc/base/thread_checker_unittest.cc ('k') | webrtc/base/virtualsocket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698