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

Side by Side Diff: remoting/test/protocol_perftest.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
« no previous file with comments | « remoting/test/fake_port_allocator.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <utility> 5 #include <utility>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 void OnFrameDecoded(std::unique_ptr<VideoPacket> packet, 189 void OnFrameDecoded(std::unique_ptr<VideoPacket> packet,
190 const base::Closure& done, 190 const base::Closure& done,
191 std::unique_ptr<webrtc::DesktopFrame> frame) { 191 std::unique_ptr<webrtc::DesktopFrame> frame) {
192 last_video_packet_ = std::move(packet); 192 last_video_packet_ = std::move(packet);
193 DrawFrame(std::move(frame), done); 193 DrawFrame(std::move(frame), done);
194 } 194 }
195 195
196 // protocol::FrameConsumer interface. 196 // protocol::FrameConsumer interface.
197 std::unique_ptr<webrtc::DesktopFrame> AllocateFrame( 197 std::unique_ptr<webrtc::DesktopFrame> AllocateFrame(
198 const webrtc::DesktopSize& size) override { 198 const webrtc::DesktopSize& size) override {
199 return base::WrapUnique(new webrtc::BasicDesktopFrame(size)); 199 return base::MakeUnique<webrtc::BasicDesktopFrame>(size);
200 } 200 }
201 201
202 void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame, 202 void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
203 const base::Closure& done) override { 203 const base::Closure& done) override {
204 last_video_frame_ = std::move(frame); 204 last_video_frame_ = std::move(frame);
205 if (!on_frame_task_.is_null()) 205 if (!on_frame_task_.is_null())
206 on_frame_task_.Run(); 206 on_frame_task_.Run();
207 if (!done.is_null()) 207 if (!done.is_null())
208 done.Run(); 208 done.Run();
209 } 209 }
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) { 693 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) {
694 MeasureScrollPerformance(false); 694 MeasureScrollPerformance(false);
695 } 695 }
696 696
697 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) { 697 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) {
698 MeasureScrollPerformance(true); 698 MeasureScrollPerformance(true);
699 } 699 }
700 700
701 } // namespace remoting 701 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/fake_port_allocator.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698