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

Side by Side Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 /* 1 /*
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if (state_ != STATE_CONNECTED) { 198 if (state_ != STATE_CONNECTED) {
199 return -1; 199 return -1;
200 } 200 }
201 201
202 if (flags != PF_SRTP_BYPASS && flags != 0) { 202 if (flags != PF_SRTP_BYPASS && flags != 0) {
203 return -1; 203 return -1;
204 } 204 }
205 205
206 PacketMessageData* packet = new PacketMessageData(data, len); 206 PacketMessageData* packet = new PacketMessageData(data, len);
207 if (async_) { 207 if (async_) {
208 rtc::Thread::Current()->Post(this, 0, packet); 208 rtc::Thread::Current()->Post(FROM_HERE, this, 0, packet);
209 } else { 209 } else {
210 rtc::Thread::Current()->Send(this, 0, packet); 210 rtc::Thread::Current()->Send(FROM_HERE, this, 0, packet);
211 } 211 }
212 rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); 212 rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis());
213 SignalSentPacket(this, sent_packet); 213 SignalSentPacket(this, sent_packet);
214 return static_cast<int>(len); 214 return static_cast<int>(len);
215 } 215 }
216 int SetOption(rtc::Socket::Option opt, int value) override { return true; } 216 int SetOption(rtc::Socket::Option opt, int value) override { return true; }
217 bool GetOption(rtc::Socket::Option opt, int* value) override { return true; } 217 bool GetOption(rtc::Socket::Option opt, int* value) override { return true; }
218 int GetError() override { return 0; } 218 int GetError() override { return 0; }
219 219
220 void AddRemoteCandidate(const Candidate& candidate) override { 220 void AddRemoteCandidate(const Candidate& candidate) override {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 SetIceRole(role); 511 SetIceRole(role);
512 } 512 }
513 513
514 FakeTransport* GetTransport_n(const std::string& transport_name) { 514 FakeTransport* GetTransport_n(const std::string& transport_name) {
515 return static_cast<FakeTransport*>( 515 return static_cast<FakeTransport*>(
516 TransportController::GetTransport_n(transport_name)); 516 TransportController::GetTransport_n(transport_name));
517 } 517 }
518 518
519 void Connect(FakeTransportController* dest) { 519 void Connect(FakeTransportController* dest) {
520 network_thread()->Invoke<void>( 520 network_thread()->Invoke<void>(
521 rtc::Bind(&FakeTransportController::Connect_n, this, dest)); 521 FROM_HERE, rtc::Bind(&FakeTransportController::Connect_n, this, dest));
522 } 522 }
523 523
524 TransportChannel* CreateTransportChannel_n(const std::string& transport_name, 524 TransportChannel* CreateTransportChannel_n(const std::string& transport_name,
525 int component) override { 525 int component) override {
526 if (fail_create_channel_) { 526 if (fail_create_channel_) {
527 return nullptr; 527 return nullptr;
528 } 528 }
529 return TransportController::CreateTransportChannel_n(transport_name, 529 return TransportController::CreateTransportChannel_n(transport_name,
530 component); 530 component);
531 } 531 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 580 }
581 } 581 }
582 582
583 private: 583 private:
584 bool fail_create_channel_; 584 bool fail_create_channel_;
585 }; 585 };
586 586
587 } // namespace cricket 587 } // namespace cricket
588 588
589 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 589 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698