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

Unified Diff: webrtc/modules/utility/source/process_thread_impl_unittest.cc

Issue 1785173002: Replace scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up8
Patch Set: Created 4 years, 9 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: webrtc/modules/utility/source/process_thread_impl_unittest.cc
diff --git a/webrtc/modules/utility/source/process_thread_impl_unittest.cc b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
index 4f70e8acdec1e5d5db28c349cdcdc250808b79ee..9fa9edfa24ace097b9531b7fca545dcc638da4bd 100644
--- a/webrtc/modules/utility/source/process_thread_impl_unittest.cc
+++ b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
#include <utility>
#include "testing/gmock/include/gmock/gmock.h"
@@ -72,7 +73,7 @@ TEST(ProcessThreadImpl, ProcessCall) {
ProcessThreadImpl thread("ProcessThread");
thread.Start();
- rtc::scoped_ptr<EventWrapper> event(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
EXPECT_CALL(module, TimeUntilNextProcess()).WillRepeatedly(Return(0));
@@ -92,7 +93,7 @@ TEST(ProcessThreadImpl, ProcessCall) {
// call to Start().
TEST(ProcessThreadImpl, ProcessCall2) {
ProcessThreadImpl thread("ProcessThread");
- rtc::scoped_ptr<EventWrapper> event(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
EXPECT_CALL(module, TimeUntilNextProcess()).WillRepeatedly(Return(0));
@@ -114,7 +115,7 @@ TEST(ProcessThreadImpl, ProcessCall2) {
// After unregistration, we should not receive any further callbacks.
TEST(ProcessThreadImpl, Deregister) {
ProcessThreadImpl thread("ProcessThread");
- rtc::scoped_ptr<EventWrapper> event(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> event(EventWrapper::Create());
int process_count = 0;
MockModule module;
@@ -151,7 +152,7 @@ void ProcessCallAfterAFewMs(int64_t milliseconds) {
ProcessThreadImpl thread("ProcessThread");
thread.Start();
- rtc::scoped_ptr<EventWrapper> event(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
int64_t start_time = 0;
@@ -216,7 +217,7 @@ TEST(ProcessThreadImpl, DISABLED_Process50Times) {
ProcessThreadImpl thread("ProcessThread");
thread.Start();
- rtc::scoped_ptr<EventWrapper> event(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
int callback_count = 0;
@@ -249,8 +250,8 @@ TEST(ProcessThreadImpl, WakeUp) {
ProcessThreadImpl thread("ProcessThread");
thread.Start();
- rtc::scoped_ptr<EventWrapper> started(EventWrapper::Create());
- rtc::scoped_ptr<EventWrapper> called(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> started(EventWrapper::Create());
+ std::unique_ptr<EventWrapper> called(EventWrapper::Create());
MockModule module;
int64_t start_time;
@@ -293,10 +294,10 @@ TEST(ProcessThreadImpl, WakeUp) {
// thread.
TEST(ProcessThreadImpl, PostTask) {
ProcessThreadImpl thread("ProcessThread");
- rtc::scoped_ptr<EventWrapper> task_ran(EventWrapper::Create());
- rtc::scoped_ptr<RaiseEventTask> task(new RaiseEventTask(task_ran.get()));
+ std::unique_ptr<EventWrapper> task_ran(EventWrapper::Create());
+ std::unique_ptr<RaiseEventTask> task(new RaiseEventTask(task_ran.get()));
thread.Start();
- thread.PostTask(std::move(task));
+ thread.PostTask(rtc::UniqueToScoped(std::move(task)));
EXPECT_EQ(kEventSignaled, task_ran->Wait(100));
thread.Stop();
}

Powered by Google App Engine
This is Rietveld 408576698