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

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_unittest.cc

Issue 1743203002: Replace scoped_ptr with unique_ptr in webrtc/modules/desktop_capture/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More Windows reverts 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/desktop_capture/screen_capturer_unittest.cc
diff --git a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
index 470baaa09eed1ac3abe3db266a7b42bf2232d5b2..72105acca478df651464ee53e186d5a3ef9c5b06 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "webrtc/modules/desktop_capture/screen_capturer.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -34,7 +36,7 @@ class ScreenCapturerTest : public testing::Test {
}
protected:
- rtc::scoped_ptr<ScreenCapturer> capturer_;
+ std::unique_ptr<ScreenCapturer> capturer_;
MockScreenCapturerCallback callback_;
};
@@ -58,7 +60,8 @@ class FakeSharedMemoryFactory : public SharedMemoryFactory {
~FakeSharedMemoryFactory() override {}
rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override {
- return rtc_make_scoped_ptr(new FakeSharedMemory(new char[size], size));
+ return rtc::scoped_ptr<SharedMemory>(
+ new FakeSharedMemory(new char[size], size));
}
private:
@@ -114,7 +117,7 @@ TEST_F(ScreenCapturerTest, UseSharedBuffers) {
capturer_->Start(&callback_);
capturer_->SetSharedMemoryFactory(
- rtc_make_scoped_ptr(new FakeSharedMemoryFactory()));
+ rtc::scoped_ptr<SharedMemoryFactory>(new FakeSharedMemoryFactory()));
capturer_->Capture(DesktopRegion());
ASSERT_TRUE(frame);

Powered by Google App Engine
This is Rietveld 408576698