summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 00:54:27 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 00:54:27 +0000
commitf0b739902f5235c47637c3ef3a0554189c7e7fbc (patch)
tree95bce72f862a366920a7b633c7141eaed268b2e5 /net
parent6c70ccb0398091413557a0102c317a3aae717da9 (diff)
downloadchromium_src-f0b739902f5235c47637c3ef3a0554189c7e7fbc.zip
chromium_src-f0b739902f5235c47637c3ef3a0554189c7e7fbc.tar.gz
chromium_src-f0b739902f5235c47637c3ef3a0554189c7e7fbc.tar.bz2
Remove prefer_ipv4.
Do not make a ConnectBackupJob prefer IPv4. We will hide the long IPv6 connect timeout on broken IPv6 networks in a different way. R=willchan@chromium.org BUG=81686 TEST=none Review URL: http://codereview.chromium.org/6969025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/socket/client_socket_pool_base.cc9
-rw-r--r--net/socket/client_socket_pool_base.h8
-rw-r--r--net/socket/transport_client_socket_pool.cc2
3 files changed, 0 insertions, 19 deletions
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 0972534..ddcbba6 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -45,7 +45,6 @@ ConnectJob::ConnectJob(const std::string& group_name,
delegate_(delegate),
net_log_(net_log),
idle_(true),
- prefer_ipv4_(false),
preconnect_state_(NOT_PRECONNECT) {
DCHECK(!group_name.empty());
DCHECK(delegate);
@@ -1071,14 +1070,6 @@ void ClientSocketPoolBaseHelper::Group::OnBackupSocketTimerFired(
group_name, **pending_requests_.begin(), pool);
backup_job->net_log().AddEvent(NetLog::TYPE_SOCKET_BACKUP_CREATED, NULL);
SIMPLE_STATS_COUNTER("socket.backup_created");
- // The purpose of the backup job is to initiate a new connect job when the
- // first connect job takes too long. We call set_prefer_ipv4 here to use
- // the backup job for a second purpose: if the first connect job is IPv6,
- // try an IPv4 connect job in parallel. This hides the long timeout error
- // on some networks with broken IPv6 support.
- // TODO(wtc): remove the set_prefer_ipv4 call when broken IPv6 networks are
- // gone.
- backup_job->set_prefer_ipv4();
int rv = backup_job->Connect();
pool->connecting_socket_count_++;
AddJob(backup_job);
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 25bc7c7..318cab8 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -80,7 +80,6 @@ class ConnectJob {
bool is_unused_preconnect() const {
return preconnect_state_ == UNUSED_PRECONNECT;
}
- bool prefer_ipv4() const { return prefer_ipv4_; }
// Initialized by the ClientSocketPoolBaseHelper.
// TODO(willchan): Move most of the constructor arguments over here. We
@@ -88,11 +87,6 @@ class ConnectJob {
// the initialization.
void Initialize(bool is_preconnect);
- // Instructs the ConnectJob to try IPv4 addresses first. This can be useful
- // when IPv6 is likely to be broken.
- // TODO(wtc): this should be folded into the Initialize() method.
- void set_prefer_ipv4() { prefer_ipv4_ = true; }
-
// Releases |socket_| to the client. On connection error, this should return
// NULL.
StreamSocket* ReleaseSocket() { return socket_.release(); }
@@ -148,8 +142,6 @@ class ConnectJob {
BoundNetLog net_log_;
// A ConnectJob is idle until Connect() has been called.
bool idle_;
- // True if we should try IPv4 addresses first.
- bool prefer_ipv4_;
PreconnectState preconnect_state_;
DISALLOW_COPY_AND_ASSIGN(ConnectJob);
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 66b4ec9..c35a934 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -175,8 +175,6 @@ int TransportConnectJob::DoResolveHostComplete(int result) {
int TransportConnectJob::DoTransportConnect() {
next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE;
- if (prefer_ipv4())
- MakeAddrListStartWithIPv4(&addresses_);
set_socket(client_socket_factory_->CreateTransportClientSocket(
addresses_, net_log().net_log(), net_log().source()));
connect_start_time_ = base::TimeTicks::Now();