Commit 1f35e553 authored by Gayane Petrosyan's avatar Gayane Petrosyan Committed by Commit Bot

Remove WebRTC-SystemUDPSendSocketSize study

Remove WebRTC-SystemUDPSendSocketSize which is long expired and not useful anymore.

Also removing an unused include from ipc_socket_factory.cc which I missed in
https://chromium-review.googlesource.com/c/chromium/src/+/854947

Bug: 799180
Change-Id: Iaa733fff48e7334ceafb3b212866c83822f369d1
Reviewed-on: https://chromium-review.googlesource.com/857884Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533006}
parent e6889e92
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -29,6 +27,8 @@ namespace { ...@@ -29,6 +27,8 @@ namespace {
const int kUdpReadBufferSize = 65536; const int kUdpReadBufferSize = 65536;
// Socket receive buffer size. // Socket receive buffer size.
const int kUdpRecvSocketBufferSize = 65536; // 64K const int kUdpRecvSocketBufferSize = 65536; // 64K
// Socket send buffer size.
const int kUdpSendSocketBufferSize = 65536;
// Defines set of transient errors. These errors are ignored when we get them // Defines set of transient errors. These errors are ignored when we get them
// from sendto() or recvfrom() calls. // from sendto() or recvfrom() calls.
...@@ -106,7 +106,6 @@ P2PSocketHostUdp::P2PSocketHostUdp( ...@@ -106,7 +106,6 @@ P2PSocketHostUdp::P2PSocketHostUdp(
send_pending_(false), send_pending_(false),
last_dscp_(net::DSCP_CS0), last_dscp_(net::DSCP_CS0),
throttler_(throttler), throttler_(throttler),
send_buffer_size_(0),
net_log_(net_log), net_log_(net_log),
socket_factory_(socket_factory) {} socket_factory_(socket_factory) {}
...@@ -127,23 +126,6 @@ P2PSocketHostUdp::~P2PSocketHostUdp() { ...@@ -127,23 +126,6 @@ P2PSocketHostUdp::~P2PSocketHostUdp() {
} }
} }
void P2PSocketHostUdp::SetSendBufferSize() {
unsigned int send_buffer_size = 0;
base::StringToUint(
base::FieldTrialList::FindFullName("WebRTC-SystemUDPSendSocketSize"),
&send_buffer_size);
if (send_buffer_size > 0) {
if (!SetOption(P2P_SOCKET_OPT_SNDBUF, send_buffer_size)) {
LOG(WARNING) << "Failed to set socket send buffer size to "
<< send_buffer_size;
} else {
send_buffer_size_ = send_buffer_size;
}
}
}
bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address,
uint16_t min_port, uint16_t min_port,
uint16_t max_port, uint16_t max_port,
...@@ -182,6 +164,12 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, ...@@ -182,6 +164,12 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address,
<< kUdpRecvSocketBufferSize; << kUdpRecvSocketBufferSize;
} }
// Setting socket send buffer size.
if (socket_->SetSendBufferSize(kUdpSendSocketBufferSize) != net::OK) {
LOG(WARNING) << "Failed to set socket send buffer size to "
<< kUdpSendSocketBufferSize;
}
net::IPEndPoint address; net::IPEndPoint address;
result = socket_->GetLocalAddress(&address); result = socket_->GetLocalAddress(&address);
if (result < 0) { if (result < 0) {
...@@ -194,8 +182,6 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, ...@@ -194,8 +182,6 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address,
state_ = STATE_OPEN; state_ = STATE_OPEN;
SetSendBufferSize();
// NOTE: Remote address will be same as what renderer provided. // NOTE: Remote address will be same as what renderer provided.
message_sender_->Send(new P2PMsg_OnSocketCreated( message_sender_->Send(new P2PMsg_OnSocketCreated(
id_, address, remote_address.ip_address)); id_, address, remote_address.ip_address));
...@@ -441,11 +427,6 @@ bool P2PSocketHostUdp::SetOption(P2PSocketOption option, int value) { ...@@ -441,11 +427,6 @@ bool P2PSocketHostUdp::SetOption(P2PSocketOption option, int value) {
case P2P_SOCKET_OPT_RCVBUF: case P2P_SOCKET_OPT_RCVBUF:
return socket_->SetReceiveBufferSize(value) == net::OK; return socket_->SetReceiveBufferSize(value) == net::OK;
case P2P_SOCKET_OPT_SNDBUF: case P2P_SOCKET_OPT_SNDBUF:
// Ignore any following call to set the send buffer size if we're under
// experiment.
if (send_buffer_size_ > 0) {
return true;
}
return socket_->SetSendBufferSize(value) == net::OK; return socket_->SetSendBufferSize(value) == net::OK;
case P2P_SOCKET_OPT_DSCP: case P2P_SOCKET_OPT_DSCP:
return (net::OK == socket_->SetDiffServCodePoint( return (net::OK == socket_->SetDiffServCodePoint(
......
...@@ -89,8 +89,6 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { ...@@ -89,8 +89,6 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
void OnError(); void OnError();
void SetSendBufferSize();
void DoRead(); void DoRead();
void OnRecv(int result); void OnRecv(int result);
void HandleReadResult(int result); void HandleReadResult(int result);
...@@ -120,9 +118,6 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { ...@@ -120,9 +118,6 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
ConnectedPeerSet connected_peers_; ConnectedPeerSet connected_peers_;
P2PMessageThrottler* throttler_; P2PMessageThrottler* throttler_;
// Keep track of the send socket buffer size under experiment.
size_t send_buffer_size_;
net::NetLog* net_log_; net::NetLog* net_log_;
// Callback object that returns a new socket when invoked. // Callback object that returns a new socket when invoked.
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/threading/thread_checker.h" #include "base/threading/thread_checker.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment