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

Side by Side Diff: remoting/client/software_video_renderer_unittest.cc

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/software_video_renderer.h" 5 #include "remoting/client/software_video_renderer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 frame_run_loop_.reset(); 45 frame_run_loop_.reset();
46 *out_done_callback = last_frame_done_callback_; 46 *out_done_callback = last_frame_done_callback_;
47 last_frame_done_callback_.Reset(); 47 last_frame_done_callback_.Reset();
48 return std::move(last_frame_); 48 return std::move(last_frame_);
49 } 49 }
50 50
51 // FrameConsumer interface. 51 // FrameConsumer interface.
52 std::unique_ptr<DesktopFrame> AllocateFrame( 52 std::unique_ptr<DesktopFrame> AllocateFrame(
53 const webrtc::DesktopSize& size) override { 53 const webrtc::DesktopSize& size) override {
54 EXPECT_TRUE(thread_checker_.CalledOnValidThread()); 54 EXPECT_TRUE(thread_checker_.CalledOnValidThread());
55 return base::WrapUnique(new webrtc::BasicDesktopFrame(size)); 55 return base::MakeUnique<webrtc::BasicDesktopFrame>(size);
56 } 56 }
57 57
58 void DrawFrame(std::unique_ptr<DesktopFrame> frame, 58 void DrawFrame(std::unique_ptr<DesktopFrame> frame,
59 const base::Closure& done) override { 59 const base::Closure& done) override {
60 EXPECT_TRUE(thread_checker_.CalledOnValidThread()); 60 EXPECT_TRUE(thread_checker_.CalledOnValidThread());
61 last_frame_ = std::move(frame); 61 last_frame_ = std::move(frame);
62 last_frame_done_callback_ = done; 62 last_frame_done_callback_ = done;
63 frame_run_loop_->Quit(); 63 frame_run_loop_->Quit();
64 } 64 }
65 65
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 EXPECT_FALSE(callback_called[frame_index]); 179 EXPECT_FALSE(callback_called[frame_index]);
180 done_callback.Run(); 180 done_callback.Run();
181 EXPECT_TRUE(callback_called[frame_index]); 181 EXPECT_TRUE(callback_called[frame_index]);
182 182
183 EXPECT_TRUE(CompareFrames(*test_frames[frame_index], *decoded_frame)); 183 EXPECT_TRUE(CompareFrames(*test_frames[frame_index], *decoded_frame));
184 } 184 }
185 } 185 }
186 186
187 } // namespace remoting 187 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_url_request.cc ('k') | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698