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

Side by Side Diff: webrtc/test/direct_transport.cc

Issue 3002163003: Add GUARDED_BY in DirectTransport (Closed)
Patch Set: . Created 3 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 | « webrtc/test/direct_transport.h ('k') | no next file » | 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include "webrtc/test/direct_transport.h" 10 #include "webrtc/test/direct_transport.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Constructor updates |next_scheduled_task_|, so it's guaranteed to 87 // Constructor updates |next_scheduled_task_|, so it's guaranteed to
88 // be initialized. 88 // be initialized.
89 task_queue_->CancelTask(next_scheduled_task_); 89 task_queue_->CancelTask(next_scheduled_task_);
90 } 90 }
91 91
92 void DirectTransport::SetConfig(const FakeNetworkPipe::Config& config) { 92 void DirectTransport::SetConfig(const FakeNetworkPipe::Config& config) {
93 fake_network_.SetConfig(config); 93 fake_network_.SetConfig(config);
94 } 94 }
95 95
96 void DirectTransport::StopSending() { 96 void DirectTransport::StopSending() {
97 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
97 task_queue_->CancelTask(next_scheduled_task_); 98 task_queue_->CancelTask(next_scheduled_task_);
98 } 99 }
99 100
100 void DirectTransport::SetReceiver(PacketReceiver* receiver) { 101 void DirectTransport::SetReceiver(PacketReceiver* receiver) {
101 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 102 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
102 fake_network_.SetReceiver(receiver); 103 fake_network_.SetReceiver(receiver);
103 } 104 }
104 105
105 bool DirectTransport::SendRtp(const uint8_t* data, 106 bool DirectTransport::SendRtp(const uint8_t* data,
106 size_t length, 107 size_t length,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 fake_network_.Process(); 146 fake_network_.Process();
146 147
147 int64_t delay_ms = fake_network_.TimeUntilNextProcess(); 148 int64_t delay_ms = fake_network_.TimeUntilNextProcess();
148 next_scheduled_task_ = task_queue_->PostDelayedTask([this]() { 149 next_scheduled_task_ = task_queue_->PostDelayedTask([this]() {
149 SendPackets(); 150 SendPackets();
150 }, delay_ms); 151 }, delay_ms);
151 } 152 }
152 } // namespace test 153 } // namespace test
153 } // namespace webrtc 154 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/direct_transport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698