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

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

Issue 3004503002: Renamed dtlstransportchannel.h/.cc/_unittest.cc. (Closed)
Patch Set: Rename dtlstransportchannel.h/.cc/_unittest.cc. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransport.h ('k') | webrtc/p2p/base/dtlstransport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransport.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel.cc b/webrtc/p2p/base/dtlstransport.cc
similarity index 97%
rename from webrtc/p2p/base/dtlstransportchannel.cc
rename to webrtc/p2p/base/dtlstransport.cc
index 08dfb6b38691536f5bc74697d5324d6f1ad2e99e..5f32a9b70bb07467d381e8c8d96ee1859bb9bd28 100644
--- a/webrtc/p2p/base/dtlstransportchannel.cc
+++ b/webrtc/p2p/base/dtlstransport.cc
@@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <algorithm>
#include <memory>
#include <utility>
-#include "webrtc/p2p/base/dtlstransportchannel.h"
+#include "webrtc/p2p/base/dtlstransport.h"
#include "webrtc/p2p/base/common.h"
#include "webrtc/p2p/base/packettransportinternal.h"
@@ -62,9 +63,9 @@ StreamInterfaceChannel::StreamInterfaceChannel(
packets_(kMaxPendingPackets, kMaxDtlsPacketLen) {}
rtc::StreamResult StreamInterfaceChannel::Read(void* buffer,
- size_t buffer_len,
- size_t* read,
- int* error) {
+ size_t buffer_len,
+ size_t* read,
+ int* error) {
if (state_ == rtc::SS_CLOSED)
return rtc::SR_EOS;
if (state_ == rtc::SS_OPENING)
@@ -78,9 +79,9 @@ rtc::StreamResult StreamInterfaceChannel::Read(void* buffer,
}
rtc::StreamResult StreamInterfaceChannel::Write(const void* data,
- size_t data_len,
- size_t* written,
- int* error) {
+ size_t data_len,
+ size_t* written,
+ int* error) {
// Always succeeds, since this is an unreliable transport anyway.
// TODO(zhihuang): Should this block if ice_transport_'s temporarily
// unwritable?
@@ -329,7 +330,6 @@ bool DtlsTransport::GetSrtpCryptoSuite(int* cipher) {
return dtls_->GetDtlsSrtpCryptoSuite(cipher);
}
-
// Called from upper layers to send a media packet.
int DtlsTransport::SendPacket(const char* data,
size_t size,
@@ -671,8 +671,7 @@ void DtlsTransport::ConfigureHandshakeTimeout() {
// Limit the timeout to a reasonable range in case the ICE RTT takes
// extreme values.
int initial_timeout = std::max(kMinHandshakeTimeout,
- std::min(kMaxHandshakeTimeout,
- 2 * (*rtt)));
+ std::min(kMaxHandshakeTimeout, 2 * (*rtt)));
LOG_J(LS_INFO, this) << "configuring DTLS handshake timeout "
<< initial_timeout << " based on ICE RTT " << *rtt;
@@ -683,5 +682,4 @@ void DtlsTransport::ConfigureHandshakeTimeout() {
}
}
-
} // namespace cricket
« no previous file with comments | « webrtc/p2p/base/dtlstransport.h ('k') | webrtc/p2p/base/dtlstransport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698