summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoralyssar <alyssar@chromium.org>2016-01-06 13:19:22 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 21:20:27 +0000
commitc4769d7b18f0787423718aa028b27e1f24b74fb3 (patch)
tree14470eb867dbf9e249323a9a78992824188f28dc /net
parent35bd52fb339b44d7d19b72214189653a6d430586 (diff)
downloadchromium_src-c4769d7b18f0787423718aa028b27e1f24b74fb3.zip
chromium_src-c4769d7b18f0787423718aa028b27e1f24b74fb3.tar.gz
chromium_src-c4769d7b18f0787423718aa028b27e1f24b74fb3.tar.bz2
Removing deprecated APIs for closing QUIC connections without details and the
few remaining callers. Merge internal change: 110537326 BUG= Review URL: https://codereview.chromium.org/1551403002 Cr-Commit-Position: refs/heads/master@{#367911}
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_connection.cc4
-rw-r--r--net/quic/quic_connection.h1
-rw-r--r--net/quic/quic_stream_factory.cc7
-rw-r--r--net/quic/reliable_quic_stream.cc4
-rw-r--r--net/quic/reliable_quic_stream.h1
-rw-r--r--net/quic/test_tools/mock_crypto_client_stream.cc3
-rw-r--r--net/tools/quic/quic_simple_client.cc3
7 files changed, 9 insertions, 14 deletions
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 538964b..a3298bc 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -2013,10 +2013,6 @@ QuicFecGroup* QuicConnection::GetFecGroup() {
return group_map_[fec_group_num];
}
-void QuicConnection::SendConnectionClose(QuicErrorCode error) {
- SendConnectionCloseWithDetails(error, string());
-}
-
void QuicConnection::SendConnectionCloseWithDetails(QuicErrorCode error,
const string& details) {
// If we're write blocked, WritePacket() will not send, but will capture the
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index ac1b284..4b23ba9 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -353,7 +353,6 @@ class NET_EXPORT_PRIVATE QuicConnection
// Sends a connection close frame to the peer, and closes the connection by
// calling CloseConnection(notifying the visitor as it does so).
- virtual void SendConnectionClose(QuicErrorCode error);
virtual void SendConnectionCloseWithDetails(QuicErrorCode error,
const std::string& details);
// Notifies the visitor of the close and marks the connection as disconnected.
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index e48985d..dbfd508 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -317,7 +317,8 @@ void QuicStreamFactory::Job::RunAuxilaryJob() {
void QuicStreamFactory::Job::Cancel() {
callback_.Reset();
if (session_)
- session_->connection()->SendConnectionClose(QUIC_CONNECTION_CANCELLED);
+ session_->connection()->SendConnectionCloseWithDetails(
+ QUIC_CONNECTION_CANCELLED, "New job canceled.");
}
void QuicStreamFactory::Job::CancelWaitForDataReadyCallback() {
@@ -473,7 +474,9 @@ int QuicStreamFactory::Job::DoConnectComplete(int rv) {
// existing session instead.
AddressList address(session_->connection()->peer_address());
if (factory_->OnResolution(server_id_, address)) {
- session_->connection()->SendConnectionClose(QUIC_CONNECTION_IP_POOLED);
+ session_->connection()->SendConnectionCloseWithDetails(
+ QUIC_CONNECTION_IP_POOLED,
+ "An active session exists for the given IP.");
session_ = nullptr;
return OK;
}
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index f42687a..f590074 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -176,10 +176,6 @@ void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) {
rst_sent_ = true;
}
-void ReliableQuicStream::CloseConnection(QuicErrorCode error) {
- session()->connection()->SendConnectionClose(error);
-}
-
void ReliableQuicStream::CloseConnectionWithDetails(QuicErrorCode error,
const string& details) {
session()->connection()->SendConnectionCloseWithDetails(error, details);
diff --git a/net/quic/reliable_quic_stream.h b/net/quic/reliable_quic_stream.h
index dfb86b3..22dce10 100644
--- a/net/quic/reliable_quic_stream.h
+++ b/net/quic/reliable_quic_stream.h
@@ -92,7 +92,6 @@ class NET_EXPORT_PRIVATE ReliableQuicStream {
// Called by the subclass or the sequencer to close the entire connection from
// this end.
- virtual void CloseConnection(QuicErrorCode error);
virtual void CloseConnectionWithDetails(QuicErrorCode error,
const std::string& details);
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index d351d3e..b0db4dd 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -29,7 +29,8 @@ MockCryptoClientStream::~MockCryptoClientStream() {}
void MockCryptoClientStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) {
- CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE);
+ CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE,
+ "Forced mock failure");
}
void MockCryptoClientStream::CryptoConnect() {
diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc
index d7a3004..9890e0c 100644
--- a/net/tools/quic/quic_simple_client.cc
+++ b/net/tools/quic/quic_simple_client.cc
@@ -232,7 +232,8 @@ void QuicSimpleClient::Disconnect() {
DCHECK(initialized_);
if (connected()) {
- session()->connection()->SendConnectionClose(QUIC_PEER_GOING_AWAY);
+ session()->connection()->SendConnectionCloseWithDetails(
+ QUIC_PEER_GOING_AWAY, "Client disconnecting");
}
STLDeleteElements(&data_to_resend_on_connect_);
STLDeleteElements(&data_sent_before_handshake_);