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

Unified Diff: webrtc/p2p/base/fakepackettransport.h

Issue 2720663003: Support GCM ciphers even if ENABLE_EXTERNAL_AUTH is defined. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/fakepackettransport.h
diff --git a/webrtc/p2p/base/fakepackettransport.h b/webrtc/p2p/base/fakepackettransport.h
index 7e2f08437ec9782164e70d1007e9fcc15d749117..d8033c23c8db725580e77a9a14554e8f3810f0bc 100644
--- a/webrtc/p2p/base/fakepackettransport.h
+++ b/webrtc/p2p/base/fakepackettransport.h
@@ -16,6 +16,7 @@
#include "webrtc/api/ortc/packettransportinterface.h"
#include "webrtc/base/asyncinvoker.h"
#include "webrtc/base/copyonwritebuffer.h"
+#include "webrtc/media/base/rtputils.h"
joachim 2017/02/28 00:11:45 Same here.
#include "webrtc/p2p/base/packettransportinternal.h"
namespace rtc {
@@ -74,10 +75,11 @@ class FakePacketTransport : public PacketTransportInternal,
if (async_) {
invoker_.AsyncInvokeDelayed<void>(
RTC_FROM_HERE, Thread::Current(),
- Bind(&FakePacketTransport::SendPacketInternal, this, packet),
+ Bind(&FakePacketTransport::SendPacketInternal, this, packet,
+ options),
async_delay_ms_);
} else {
- SendPacketInternal(packet);
+ SendPacketInternal(packet, options);
}
SentPacket sent_packet(options.packet_id, TimeMillis());
SignalSentPacket(this, sent_packet);
@@ -110,9 +112,14 @@ class FakePacketTransport : public PacketTransportInternal,
SignalReceivingState(this);
}
- void SendPacketInternal(const CopyOnWriteBuffer& packet) {
+ void SendPacketInternal(const CopyOnWriteBuffer& packet,
+ const PacketOptions& options) {
if (dest_) {
- dest_->SignalReadPacket(dest_, packet.data<char>(), packet.size(),
+ rtc::CopyOnWriteBuffer data(packet);
+ cricket::ApplyPacketOptions(
+ reinterpret_cast<uint8_t*>(data.data<char>()), data.size(),
+ options.packet_time_params, 0);
+ dest_->SignalReadPacket(dest_, data.data<char>(), data.size(),
CreatePacketTime(0), 0);
}
}

Powered by Google App Engine
This is Rietveld 408576698