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

Unified Diff: webrtc/p2p/base/p2ptransport.cc

Issue 2553043004: Revert of Refactoring that removes P2PTransport and DtlsTransport classes. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « webrtc/p2p/base/p2ptransport.h ('k') | webrtc/p2p/base/p2ptransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransport.cc
diff --git a/webrtc/p2p/base/p2ptransport.cc b/webrtc/p2p/base/p2ptransport.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1ad2a6faa3fa9486c06be5d5441f83bab957fdf3
--- /dev/null
+++ b/webrtc/p2p/base/p2ptransport.cc
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/p2p/base/p2ptransport.h"
+
+#include <string>
+
+#include "webrtc/base/base64.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/stringencode.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/p2p/base/p2ptransportchannel.h"
+
+namespace cricket {
+
+P2PTransport::P2PTransport(const std::string& name, PortAllocator* allocator)
+ : Transport(name, allocator) {}
+
+P2PTransport::~P2PTransport() {
+ DestroyAllChannels();
+}
+
+TransportChannelImpl* P2PTransport::CreateTransportChannel(int component) {
+ return new P2PTransportChannel(name(), component, port_allocator());
+}
+
+void P2PTransport::DestroyTransportChannel(TransportChannelImpl* channel) {
+ delete channel;
+}
+
+} // namespace cricket
« no previous file with comments | « webrtc/p2p/base/p2ptransport.h ('k') | webrtc/p2p/base/p2ptransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698