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

Side by Side Diff: webrtc/test/fake_network_pipe.h

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 7 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 | « webrtc/test/fake_audio_device.h ('k') | webrtc/test/fake_network_pipe_unittest.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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ 11 #ifndef WEBRTC_TEST_FAKE_NETWORK_PIPE_H_
12 #define WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ 12 #define WEBRTC_TEST_FAKE_NETWORK_PIPE_H_
13 13
14 #include <memory>
14 #include <set> 15 #include <set>
15 #include <string.h> 16 #include <string.h>
16 #include <queue> 17 #include <queue>
17 18
18 #include "webrtc/base/constructormagic.h" 19 #include "webrtc/base/constructormagic.h"
19 #include "webrtc/base/criticalsection.h" 20 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/random.h" 21 #include "webrtc/base/random.h"
21 #include "webrtc/base/scoped_ptr.h" 22 #include "webrtc/base/scoped_ptr.h"
22 #include "webrtc/typedefs.h" 23 #include "webrtc/typedefs.h"
23 24
(...skipping 19 matching lines...) Expand all
43 uint8_t* data() const { return data_.get(); } 44 uint8_t* data() const { return data_.get(); }
44 size_t data_length() const { return data_length_; } 45 size_t data_length() const { return data_length_; }
45 int64_t send_time() const { return send_time_; } 46 int64_t send_time() const { return send_time_; }
46 int64_t arrival_time() const { return arrival_time_; } 47 int64_t arrival_time() const { return arrival_time_; }
47 void IncrementArrivalTime(int64_t extra_delay) { 48 void IncrementArrivalTime(int64_t extra_delay) {
48 arrival_time_ += extra_delay; 49 arrival_time_ += extra_delay;
49 } 50 }
50 51
51 private: 52 private:
52 // The packet data. 53 // The packet data.
53 rtc::scoped_ptr<uint8_t[]> data_; 54 std::unique_ptr<uint8_t[]> data_;
54 // Length of data_. 55 // Length of data_.
55 size_t data_length_; 56 size_t data_length_;
56 // The time the packet was sent out on the network. 57 // The time the packet was sent out on the network.
57 const int64_t send_time_; 58 const int64_t send_time_;
58 // The time the packet should arrive at the receiver. 59 // The time the packet should arrive at the receiver.
59 int64_t arrival_time_; 60 int64_t arrival_time_;
60 }; 61 };
61 62
62 // Class faking a network link. This is a simple and naive solution just faking 63 // Class faking a network link. This is a simple and naive solution just faking
63 // capacity and adding an extra transport delay in addition to the capacity 64 // capacity and adding an extra transport delay in addition to the capacity
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 int64_t total_packet_delay_; 135 int64_t total_packet_delay_;
135 136
136 int64_t next_process_time_; 137 int64_t next_process_time_;
137 138
138 RTC_DISALLOW_COPY_AND_ASSIGN(FakeNetworkPipe); 139 RTC_DISALLOW_COPY_AND_ASSIGN(FakeNetworkPipe);
139 }; 140 };
140 141
141 } // namespace webrtc 142 } // namespace webrtc
142 143
143 #endif // WEBRTC_TEST_FAKE_NETWORK_PIPE_H_ 144 #endif // WEBRTC_TEST_FAKE_NETWORK_PIPE_H_
OLDNEW
« no previous file with comments | « webrtc/test/fake_audio_device.h ('k') | webrtc/test/fake_network_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698