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

Side by Side Diff: media/cast/test/loopback_transport.h

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « media/cast/test/linux_output_window.h ('k') | media/cast/test/loopback_transport.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 #ifndef MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_ 5 #ifndef MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
6 #define MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_ 6 #define MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "media/cast/cast_environment.h" 14 #include "media/cast/cast_environment.h"
14 #include "media/cast/net/cast_transport_config.h" 15 #include "media/cast/net/cast_transport_config.h"
15 16
16 namespace base { 17 namespace base {
17 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
18 class TickClock; 19 class TickClock;
19 } // namespace base 20 } // namespace base
20 21
21 namespace media { 22 namespace media {
22 namespace cast { 23 namespace cast {
(...skipping 20 matching lines...) Expand all
43 44
44 // Initiailize this loopback transport. 45 // Initiailize this loopback transport.
45 // Establish a flow of packets from |pipe| to |packet_receiver|. 46 // Establish a flow of packets from |pipe| to |packet_receiver|.
46 // 47 //
47 // The data flow looks like: 48 // The data flow looks like:
48 // SendPacket() -> |pipe| -> Fake loopback pipe -> |packet_receiver|. 49 // SendPacket() -> |pipe| -> Fake loopback pipe -> |packet_receiver|.
49 // 50 //
50 // If |pipe| is NULL then the data flow looks like: 51 // If |pipe| is NULL then the data flow looks like:
51 // SendPacket() -> Fake loopback pipe -> |packet_receiver|. 52 // SendPacket() -> Fake loopback pipe -> |packet_receiver|.
52 void Initialize( 53 void Initialize(
53 scoped_ptr<test::PacketPipe> pipe, 54 std::unique_ptr<test::PacketPipe> pipe,
54 const PacketReceiverCallback& packet_receiver, 55 const PacketReceiverCallback& packet_receiver,
55 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 56 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
56 base::TickClock* clock); 57 base::TickClock* clock);
57 58
58 private: 59 private:
59 const scoped_refptr<CastEnvironment> cast_environment_; 60 const scoped_refptr<CastEnvironment> cast_environment_;
60 scoped_ptr<test::PacketPipe> packet_pipe_; 61 std::unique_ptr<test::PacketPipe> packet_pipe_;
61 int64_t bytes_sent_; 62 int64_t bytes_sent_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(LoopBackTransport); 64 DISALLOW_COPY_AND_ASSIGN(LoopBackTransport);
64 }; 65 };
65 66
66 } // namespace cast 67 } // namespace cast
67 } // namespace media 68 } // namespace media
68 69
69 #endif // MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_ 70 #endif // MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
OLDNEW
« no previous file with comments | « media/cast/test/linux_output_window.h ('k') | media/cast/test/loopback_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698