diff options
author | rch <rch@chromium.org> | 2016-01-15 08:26:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-15 16:28:00 +0000 |
commit | 12fef55822ccb213cafb8dfab89b8644dd0eb307 (patch) | |
tree | a3c4256f3addeeb963769ee232656057b5c9cc1f | |
parent | d525c3859d9fe0624112f3c1c753ee2207bee121 (diff) | |
download | chromium_src-12fef55822ccb213cafb8dfab89b8644dd0eb307.zip chromium_src-12fef55822ccb213cafb8dfab89b8644dd0eb307.tar.gz chromium_src-12fef55822ccb213cafb8dfab89b8644dd0eb307.tar.bz2 |
Rename chromium-specific QUIC classes.
Review URL: https://codereview.chromium.org/1581283002
Cr-Commit-Position: refs/heads/master@{#369761}
24 files changed, 147 insertions, 144 deletions
diff --git a/net/net.gypi b/net/net.gypi index 3ccafca..6214b52 100644 --- a/net/net.gypi +++ b/net/net.gypi @@ -337,14 +337,14 @@ 'quic/quic_config.h', 'quic/quic_connection.cc', 'quic/quic_connection.h', - 'quic/quic_connection_helper.cc', - 'quic/quic_connection_helper.h', 'quic/quic_connection_logger.cc', 'quic/quic_connection_logger.h', 'quic/quic_connection_stats.cc', 'quic/quic_connection_stats.h', 'quic/quic_crypto_stream.cc', 'quic/quic_crypto_stream.h', + 'quic/quic_chromium_connection_helper.cc', + 'quic/quic_chromium_connection_helper.h', 'quic/quic_data_reader.cc', 'quic/quic_data_reader.h', 'quic/quic_data_writer.cc', @@ -1014,6 +1014,8 @@ 'quic/network_connection.h', 'quic/quic_chromium_client_session.cc', 'quic/quic_chromium_client_session.h', + 'quic/quic_chromium_client_stream.cc', + 'quic/quic_chromium_client_stream.h', 'quic/quic_client_session_base.cc', 'quic/quic_client_session_base.h', 'quic/quic_crypto_client_stream.cc', @@ -1028,8 +1030,6 @@ 'quic/quic_http_stream.h', 'quic/quic_http_utils.cc', 'quic/quic_http_utils.h', - 'quic/quic_reliable_client_stream.cc', - 'quic/quic_reliable_client_stream.h', 'quic/quic_spdy_session.cc', 'quic/quic_spdy_session.h', 'quic/quic_spdy_stream.cc', @@ -1574,9 +1574,10 @@ 'quic/quic_alarm_test.cc', 'quic/quic_bandwidth_test.cc', 'quic/quic_chromium_client_session_test.cc', + 'quic/quic_chromium_client_stream_test.cc', + 'quic/quic_chromium_connection_helper_test.cc', 'quic/quic_clock_test.cc', 'quic/quic_config_test.cc', - 'quic/quic_connection_helper_test.cc', 'quic/quic_connection_logger_unittest.cc', 'quic/quic_connection_test.cc', 'quic/quic_crypto_client_stream_test.cc', @@ -1596,7 +1597,6 @@ 'quic/quic_packet_generator_test.cc', 'quic/quic_protocol_test.cc', 'quic/quic_received_packet_manager_test.cc', - 'quic/quic_reliable_client_stream_test.cc', 'quic/quic_sent_entropy_manager_test.cc', 'quic/quic_sent_packet_manager_test.cc', 'quic/quic_server_id_test.cc', diff --git a/net/quic/p2p/quic_p2p_session_test.cc b/net/quic/p2p/quic_p2p_session_test.cc index 06b62c1..544c082 100644 --- a/net/quic/p2p/quic_p2p_session_test.cc +++ b/net/quic/p2p/quic_p2p_session_test.cc @@ -18,7 +18,7 @@ #include "net/quic/crypto/quic_random.h" #include "net/quic/p2p/quic_p2p_crypto_config.h" #include "net/quic/p2p/quic_p2p_stream.h" -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_default_packet_writer.h" #include "net/socket/socket.h" #include "testing/gtest/include/gtest/gtest.h" @@ -245,7 +245,7 @@ class QuicP2PSessionTest : public ::testing::Test { QuicStreamId expected_stream_id); QuicClock quic_clock_; - QuicConnectionHelper quic_helper_; + QuicChromiumConnectionHelper quic_helper_; QuicConfig config_; base::WeakPtr<FakeP2PDatagramSocket> socket1_; diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc index d8000a7..c30b69f 100644 --- a/net/quic/quic_chromium_client_session.cc +++ b/net/quic/quic_chromium_client_session.cc @@ -21,7 +21,7 @@ #include "net/http/transport_security_state.h" #include "net/quic/crypto/proof_verifier_chromium.h" #include "net/quic/crypto/quic_server_info.h" -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_crypto_client_stream_factory.h" #include "net/quic/quic_server_id.h" #include "net/quic/quic_stream_factory.h" @@ -130,7 +130,7 @@ QuicChromiumClientSession::StreamRequest::~StreamRequest() { int QuicChromiumClientSession::StreamRequest::StartRequest( const base::WeakPtr<QuicChromiumClientSession>& session, - QuicReliableClientStream** stream, + QuicChromiumClientStream** stream, const CompletionCallback& callback) { session_ = session; stream_ = stream; @@ -150,7 +150,7 @@ void QuicChromiumClientSession::StreamRequest::CancelRequest() { } void QuicChromiumClientSession::StreamRequest::OnRequestCompleteSuccess( - QuicReliableClientStream* stream) { + QuicChromiumClientStream* stream) { session_.reset(); *stream_ = stream; ResetAndReturn(&callback_).Run(OK); @@ -373,7 +373,7 @@ void QuicChromiumClientSession::RemoveObserver(Observer* observer) { int QuicChromiumClientSession::TryCreateStream( StreamRequest* request, - QuicReliableClientStream** stream) { + QuicChromiumClientStream** stream) { if (!crypto_stream_->encryption_established()) { DLOG(DFATAL) << "Encryption not established."; return ERR_CONNECTION_CLOSED; @@ -413,7 +413,7 @@ void QuicChromiumClientSession::CancelRequest(StreamRequest* request) { } } -QuicReliableClientStream* +QuicChromiumClientStream* QuicChromiumClientSession::CreateOutgoingDynamicStream(SpdyPriority priority) { if (!crypto_stream_->encryption_established()) { DVLOG(1) << "Encryption not active so no outgoing stream created."; @@ -436,11 +436,11 @@ QuicChromiumClientSession::CreateOutgoingDynamicStream(SpdyPriority priority) { return CreateOutgoingReliableStreamImpl(); } -QuicReliableClientStream* +QuicChromiumClientStream* QuicChromiumClientSession::CreateOutgoingReliableStreamImpl() { DCHECK(connection()->connected()); - QuicReliableClientStream* stream = - new QuicReliableClientStream(GetNextOutgoingStreamId(), this, net_log_); + QuicChromiumClientStream* stream = + new QuicChromiumClientStream(GetNextOutgoingStreamId(), this, net_log_); ActivateStream(stream); ++num_total_streams_; UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", @@ -869,7 +869,7 @@ void QuicChromiumClientSession::CloseAllStreams(int net_error) { while (!dynamic_streams().empty()) { ReliableQuicStream* stream = dynamic_streams().begin()->second; QuicStreamId id = stream->id(); - static_cast<QuicReliableClientStream*>(stream)->OnError(net_error); + static_cast<QuicChromiumClientStream*>(stream)->OnError(net_error); CloseStream(id); } } diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h index 31da6cc..e47f414 100644 --- a/net/quic/quic_chromium_client_session.h +++ b/net/quic/quic_chromium_client_session.h @@ -22,19 +22,19 @@ #include "net/base/socket_performance_watcher.h" #include "net/cert/ct_verify_result.h" #include "net/proxy/proxy_server.h" +#include "net/quic/quic_chromium_client_stream.h" #include "net/quic/quic_client_session_base.h" #include "net/quic/quic_connection_logger.h" #include "net/quic/quic_crypto_client_stream.h" #include "net/quic/quic_packet_reader.h" #include "net/quic/quic_protocol.h" -#include "net/quic/quic_reliable_client_stream.h" #include "net/quic/quic_time.h" namespace net { class CertVerifyResult; class DatagramClientSocket; -class QuicConnectionHelper; +class QuicChromiumConnectionHelper; class QuicCryptoClientStreamFactory; class QuicServerId; class QuicServerInfo; @@ -81,7 +81,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession // ERR_IO_PENDING is returned, then when the request is eventuallly // complete |callback| will be called. int StartRequest(const base::WeakPtr<QuicChromiumClientSession>& session, - QuicReliableClientStream** stream, + QuicChromiumClientStream** stream, const CompletionCallback& callback); // Cancels any pending stream creation request. May be called @@ -93,7 +93,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession // Called by |session_| for an asynchronous request when the stream // request has finished successfully. - void OnRequestCompleteSuccess(QuicReliableClientStream* stream); + void OnRequestCompleteSuccess(QuicChromiumClientStream* stream); // Called by |session_| for an asynchronous request when the stream // request has finished with an error. Also called with ERR_ABORTED @@ -102,7 +102,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession base::WeakPtr<QuicChromiumClientSession> session_; CompletionCallback callback_; - QuicReliableClientStream** stream_; + QuicChromiumClientStream** stream_; DISALLOW_COPY_AND_ASSIGN(StreamRequest); }; @@ -142,7 +142,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession // TODO(rch): remove |stream| from this and use setter on |request| // and fix in spdy too. int TryCreateStream(StreamRequest* request, - QuicReliableClientStream** stream); + QuicChromiumClientStream** stream); // Cancels the pending stream creation request. void CancelRequest(StreamRequest* request); @@ -152,7 +152,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession // QuicSession methods: void OnStreamFrame(const QuicStreamFrame& frame) override; - QuicReliableClientStream* CreateOutgoingDynamicStream( + QuicChromiumClientStream* CreateOutgoingDynamicStream( SpdyPriority priority) override; QuicCryptoClientStream* GetCryptoStream() override; void CloseStream(QuicStreamId stream_id) override; @@ -250,7 +250,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession typedef std::set<Observer*> ObserverSet; typedef std::list<StreamRequest*> StreamRequestQueue; - QuicReliableClientStream* CreateOutgoingReliableStreamImpl(); + QuicChromiumClientStream* CreateOutgoingReliableStreamImpl(); // A completion callback invoked when a read completes. void OnReadComplete(int result); diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc index 245843f..6d0288a 100644 --- a/net/quic/quic_chromium_client_session_test.cc +++ b/net/quic/quic_chromium_client_session_test.cc @@ -22,7 +22,7 @@ #include "net/quic/crypto/quic_decrypter.h" #include "net/quic/crypto/quic_encrypter.h" #include "net/quic/crypto/quic_server_info.h" -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_crypto_client_stream_factory.h" #include "net/quic/quic_default_packet_writer.h" #include "net/quic/quic_flags.h" @@ -124,7 +124,7 @@ class QuicChromiumClientSessionTest scoped_ptr<SequencedSocketData> socket_data_; MockClock clock_; MockRandom random_; - QuicConnectionHelper helper_; + QuicChromiumConnectionHelper helper_; TransportSecurityState transport_security_state_; MockCryptoClientStreamFactory crypto_client_stream_factory_; scoped_ptr<QuicChromiumClientSession> session_; @@ -156,9 +156,9 @@ TEST_P(QuicChromiumClientSessionTest, MaxNumStreams) { CompleteCryptoHandshake(); const size_t kMaxOpenStreams = session_->get_max_open_streams(); - std::vector<QuicReliableClientStream*> streams; + std::vector<QuicChromiumClientStream*> streams; for (size_t i = 0; i < kMaxOpenStreams; i++) { - QuicReliableClientStream* stream = + QuicChromiumClientStream* stream = session_->CreateOutgoingDynamicStream(kDefaultPriority); EXPECT_TRUE(stream); streams.push_back(stream); @@ -191,15 +191,15 @@ TEST_P(QuicChromiumClientSessionTest, MaxNumStreamsViaRequest) { CompleteCryptoHandshake(); const size_t kMaxOpenStreams = session_->get_max_open_streams(); - std::vector<QuicReliableClientStream*> streams; + std::vector<QuicChromiumClientStream*> streams; for (size_t i = 0; i < kMaxOpenStreams; i++) { - QuicReliableClientStream* stream = + QuicChromiumClientStream* stream = session_->CreateOutgoingDynamicStream(kDefaultPriority); EXPECT_TRUE(stream); streams.push_back(stream); } - QuicReliableClientStream* stream; + QuicChromiumClientStream* stream; QuicChromiumClientSession::StreamRequest stream_request; TestCompletionCallback callback; ASSERT_EQ(ERR_IO_PENDING, diff --git a/net/quic/quic_reliable_client_stream.cc b/net/quic/quic_chromium_client_stream.cc index ada2869..2c558e5 100644 --- a/net/quic/quic_reliable_client_stream.cc +++ b/net/quic/quic_chromium_client_stream.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/quic/quic_reliable_client_stream.h" +#include "net/quic/quic_chromium_client_stream.h" #include "base/callback_helpers.h" #include "base/location.h" @@ -15,7 +15,7 @@ namespace net { -QuicReliableClientStream::QuicReliableClientStream(QuicStreamId id, +QuicChromiumClientStream::QuicChromiumClientStream(QuicStreamId id, QuicSpdySession* session, const BoundNetLog& net_log) : QuicSpdyStream(id, session), @@ -24,19 +24,19 @@ QuicReliableClientStream::QuicReliableClientStream(QuicStreamId id, headers_delivered_(false), weak_factory_(this) {} -QuicReliableClientStream::~QuicReliableClientStream() { +QuicChromiumClientStream::~QuicChromiumClientStream() { if (delegate_) delegate_->OnClose(connection_error()); } -void QuicReliableClientStream::OnStreamHeadersComplete(bool fin, +void QuicChromiumClientStream::OnStreamHeadersComplete(bool fin, size_t frame_len) { QuicSpdyStream::OnStreamHeadersComplete(fin, frame_len); // The delegate will read the headers via a posted task. NotifyDelegateOfHeadersCompleteLater(frame_len); } -void QuicReliableClientStream::OnDataAvailable() { +void QuicChromiumClientStream::OnDataAvailable() { // TODO(rch): buffer data if we don't have a delegate. if (!delegate_) { DLOG(ERROR) << "Missing delegate"; @@ -54,7 +54,7 @@ void QuicReliableClientStream::OnDataAvailable() { NotifyDelegateOfDataAvailableLater(); } -void QuicReliableClientStream::OnClose() { +void QuicChromiumClientStream::OnClose() { if (delegate_) { delegate_->OnClose(connection_error()); delegate_ = nullptr; @@ -62,7 +62,7 @@ void QuicReliableClientStream::OnClose() { ReliableQuicStream::OnClose(); } -void QuicReliableClientStream::OnCanWrite() { +void QuicChromiumClientStream::OnCanWrite() { ReliableQuicStream::OnCanWrite(); if (!HasBufferedData() && !callback_.is_null()) { @@ -70,14 +70,14 @@ void QuicReliableClientStream::OnCanWrite() { } } -SpdyPriority QuicReliableClientStream::Priority() const { +SpdyPriority QuicChromiumClientStream::Priority() const { if (delegate_ && delegate_->HasSendHeadersComplete()) { return QuicSpdyStream::Priority(); } return net::kV3HighestPriority; } -int QuicReliableClientStream::WriteStreamData( +int QuicChromiumClientStream::WriteStreamData( base::StringPiece data, bool fin, const CompletionCallback& callback) { @@ -93,8 +93,8 @@ int QuicReliableClientStream::WriteStreamData( return ERR_IO_PENDING; } -void QuicReliableClientStream::SetDelegate( - QuicReliableClientStream::Delegate* delegate) { +void QuicChromiumClientStream::SetDelegate( + QuicChromiumClientStream::Delegate* delegate) { DCHECK(!(delegate_ && delegate)); delegate_ = delegate; if (delegate == nullptr && sequencer()->IsClosed()) { @@ -102,15 +102,15 @@ void QuicReliableClientStream::SetDelegate( } } -void QuicReliableClientStream::OnError(int error) { +void QuicChromiumClientStream::OnError(int error) { if (delegate_) { - QuicReliableClientStream::Delegate* delegate = delegate_; + QuicChromiumClientStream::Delegate* delegate = delegate_; delegate_ = nullptr; delegate->OnError(error); } } -int QuicReliableClientStream::Read(IOBuffer* buf, int buf_len) { +int QuicChromiumClientStream::Read(IOBuffer* buf, int buf_len) { if (sequencer()->IsClosed()) return 0; // EOF @@ -123,7 +123,7 @@ int QuicReliableClientStream::Read(IOBuffer* buf, int buf_len) { return Readv(&iov, 1); } -bool QuicReliableClientStream::CanWrite(const CompletionCallback& callback) { +bool QuicChromiumClientStream::CanWrite(const CompletionCallback& callback) { bool can_write = session()->connection()->CanWrite(HAS_RETRANSMITTABLE_DATA); if (!can_write) { session()->MarkConnectionLevelWriteBlocked(id(), Priority()); @@ -133,16 +133,16 @@ bool QuicReliableClientStream::CanWrite(const CompletionCallback& callback) { return can_write; } -void QuicReliableClientStream::NotifyDelegateOfHeadersCompleteLater( +void QuicChromiumClientStream::NotifyDelegateOfHeadersCompleteLater( size_t frame_len) { DCHECK(delegate_); base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, - base::Bind(&QuicReliableClientStream::NotifyDelegateOfHeadersComplete, + base::Bind(&QuicChromiumClientStream::NotifyDelegateOfHeadersComplete, weak_factory_.GetWeakPtr(), frame_len)); } -void QuicReliableClientStream::NotifyDelegateOfHeadersComplete( +void QuicChromiumClientStream::NotifyDelegateOfHeadersComplete( size_t frame_len) { if (!delegate_) return; @@ -162,15 +162,15 @@ void QuicReliableClientStream::NotifyDelegateOfHeadersComplete( delegate_->OnHeadersAvailable(headers, frame_len); } -void QuicReliableClientStream::NotifyDelegateOfDataAvailableLater() { +void QuicChromiumClientStream::NotifyDelegateOfDataAvailableLater() { DCHECK(delegate_); base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, - base::Bind(&QuicReliableClientStream::NotifyDelegateOfDataAvailable, + base::Bind(&QuicChromiumClientStream::NotifyDelegateOfDataAvailable, weak_factory_.GetWeakPtr())); } -void QuicReliableClientStream::NotifyDelegateOfDataAvailable() { +void QuicChromiumClientStream::NotifyDelegateOfDataAvailable() { if (delegate_) delegate_->OnDataAvailable(); } diff --git a/net/quic/quic_reliable_client_stream.h b/net/quic/quic_chromium_client_stream.h index 3e02fc1..5a8ddf5 100644 --- a/net/quic/quic_reliable_client_stream.h +++ b/net/quic/quic_chromium_client_stream.h @@ -23,7 +23,7 @@ class QuicSpdySession; // A client-initiated ReliableQuicStream. Instances of this class // are owned by the QuicClientSession which created them. -class NET_EXPORT_PRIVATE QuicReliableClientStream : public QuicSpdyStream { +class NET_EXPORT_PRIVATE QuicChromiumClientStream : public QuicSpdyStream { public: // Delegate handles protocol specific behavior of a quic stream. class NET_EXPORT_PRIVATE Delegate { @@ -53,11 +53,11 @@ class NET_EXPORT_PRIVATE QuicReliableClientStream : public QuicSpdyStream { DISALLOW_COPY_AND_ASSIGN(Delegate); }; - QuicReliableClientStream(QuicStreamId id, + QuicChromiumClientStream(QuicStreamId id, QuicSpdySession* session, const BoundNetLog& net_log); - ~QuicReliableClientStream() override; + ~QuicChromiumClientStream() override; // QuicSpdyStream void OnStreamHeadersComplete(bool fin, size_t frame_len) override; @@ -106,9 +106,9 @@ class NET_EXPORT_PRIVATE QuicReliableClientStream : public QuicSpdyStream { CompletionCallback callback_; - base::WeakPtrFactory<QuicReliableClientStream> weak_factory_; + base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(QuicReliableClientStream); + DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); }; } // namespace net diff --git a/net/quic/quic_reliable_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc index 7898202..b8ea052 100644 --- a/net/quic/quic_reliable_client_stream_test.cc +++ b/net/quic/quic_chromium_client_stream_test.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/quic/quic_reliable_client_stream.h" +#include "net/quic/quic_chromium_client_stream.h" #include "base/macros.h" #include "net/base/net_errors.h" @@ -28,7 +28,7 @@ namespace { const QuicStreamId kTestStreamId = 5u; -class MockDelegate : public QuicReliableClientStream::Delegate { +class MockDelegate : public QuicChromiumClientStream::Delegate { public: MockDelegate() {} @@ -45,16 +45,16 @@ class MockDelegate : public QuicReliableClientStream::Delegate { DISALLOW_COPY_AND_ASSIGN(MockDelegate); }; -class QuicReliableClientStreamTest +class QuicChromiumClientStreamTest : public ::testing::TestWithParam<QuicVersion> { public: - QuicReliableClientStreamTest() + QuicChromiumClientStreamTest() : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), session_(new MockConnection(&helper_, Perspective::IS_CLIENT, SupportedVersions(GetParam()))) { stream_ = - new QuicReliableClientStream(kTestStreamId, &session_, BoundNetLog()); + new QuicChromiumClientStream(kTestStreamId, &session_, BoundNetLog()); session_.ActivateStream(stream_); stream_->SetDelegate(&delegate_); } @@ -101,15 +101,15 @@ class QuicReliableClientStreamTest testing::StrictMock<MockDelegate> delegate_; MockConnectionHelper helper_; MockQuicSpdySession session_; - QuicReliableClientStream* stream_; + QuicChromiumClientStream* stream_; SpdyHeaderBlock headers_; }; INSTANTIATE_TEST_CASE_P(Version, - QuicReliableClientStreamTest, + QuicChromiumClientStreamTest, ::testing::ValuesIn(QuicSupportedVersions())); -TEST_P(QuicReliableClientStreamTest, OnFinRead) { +TEST_P(QuicChromiumClientStreamTest, OnFinRead) { InitializeHeaders(); std::string uncompressed_headers = SpdyUtils::SerializeUncompressedHeaders(headers_); @@ -127,14 +127,14 @@ TEST_P(QuicReliableClientStreamTest, OnFinRead) { stream_->OnStreamFrame(frame2); } -TEST_P(QuicReliableClientStreamTest, OnDataAvailableBeforeHeaders) { +TEST_P(QuicChromiumClientStreamTest, OnDataAvailableBeforeHeaders) { EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); EXPECT_CALL(delegate_, OnDataAvailable()).Times(0); stream_->OnDataAvailable(); } -TEST_P(QuicReliableClientStreamTest, OnDataAvailable) { +TEST_P(QuicChromiumClientStreamTest, OnDataAvailable) { InitializeHeaders(); std::string uncompressed_headers = SpdyUtils::SerializeUncompressedHeaders(headers_); @@ -152,14 +152,14 @@ TEST_P(QuicReliableClientStreamTest, OnDataAvailable) { EXPECT_CALL(delegate_, OnDataAvailable()) .WillOnce(testing::Invoke( - CreateFunctor(this, &QuicReliableClientStreamTest::ReadData, + CreateFunctor(this, &QuicChromiumClientStreamTest::ReadData, StringPiece(data, arraysize(data) - 1)))); base::MessageLoop::current()->RunUntilIdle(); EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); } -TEST_P(QuicReliableClientStreamTest, ProcessHeadersWithError) { +TEST_P(QuicChromiumClientStreamTest, ProcessHeadersWithError) { std::string bad_headers = "..."; stream_->OnStreamHeaders(StringPiece(bad_headers)); stream_->OnStreamHeadersComplete(false, bad_headers.length()); @@ -171,7 +171,7 @@ TEST_P(QuicReliableClientStreamTest, ProcessHeadersWithError) { EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); } -TEST_P(QuicReliableClientStreamTest, OnDataAvailableWithError) { +TEST_P(QuicChromiumClientStreamTest, OnDataAvailableWithError) { InitializeHeaders(); std::string uncompressed_headers = SpdyUtils::SerializeUncompressedHeaders(headers_); @@ -188,20 +188,20 @@ TEST_P(QuicReliableClientStreamTest, OnDataAvailableWithError) { /*offset=*/0, data)); EXPECT_CALL(delegate_, OnDataAvailable()) .WillOnce(testing::Invoke(CreateFunctor( - stream_, &QuicReliableClientStream::Reset, QUIC_STREAM_CANCELLED))); + stream_, &QuicChromiumClientStream::Reset, QUIC_STREAM_CANCELLED))); base::MessageLoop::current()->RunUntilIdle(); EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); } -TEST_P(QuicReliableClientStreamTest, OnError) { +TEST_P(QuicChromiumClientStreamTest, OnError) { EXPECT_CALL(delegate_, OnError(ERR_INTERNET_DISCONNECTED)); stream_->OnError(ERR_INTERNET_DISCONNECTED); EXPECT_FALSE(stream_->GetDelegate()); } -TEST_P(QuicReliableClientStreamTest, WriteStreamData) { +TEST_P(QuicChromiumClientStreamTest, WriteStreamData) { EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); const char kData1[] = "hello world"; @@ -215,7 +215,7 @@ TEST_P(QuicReliableClientStreamTest, WriteStreamData) { true, callback.callback())); } -TEST_P(QuicReliableClientStreamTest, WriteStreamDataAsync) { +TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) { EXPECT_CALL(delegate_, HasSendHeadersComplete()).Times(AnyNumber()); EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); diff --git a/net/quic/quic_connection_helper.cc b/net/quic/quic_chromium_connection_helper.cc index 9b3d4d7..68c0a10 100644 --- a/net/quic/quic_connection_helper.cc +++ b/net/quic/quic_chromium_connection_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "base/location.h" #include "base/logging.h" @@ -91,29 +91,31 @@ class QuicChromeAlarm : public QuicAlarm { } // namespace -QuicConnectionHelper::QuicConnectionHelper(base::TaskRunner* task_runner, - const QuicClock* clock, - QuicRandom* random_generator) +QuicChromiumConnectionHelper::QuicChromiumConnectionHelper( + base::TaskRunner* task_runner, + const QuicClock* clock, + QuicRandom* random_generator) : task_runner_(task_runner), clock_(clock), random_generator_(random_generator), weak_factory_(this) {} -QuicConnectionHelper::~QuicConnectionHelper() {} +QuicChromiumConnectionHelper::~QuicChromiumConnectionHelper() {} -const QuicClock* QuicConnectionHelper::GetClock() const { +const QuicClock* QuicChromiumConnectionHelper::GetClock() const { return clock_; } -QuicRandom* QuicConnectionHelper::GetRandomGenerator() { +QuicRandom* QuicChromiumConnectionHelper::GetRandomGenerator() { return random_generator_; } -QuicAlarm* QuicConnectionHelper::CreateAlarm(QuicAlarm::Delegate* delegate) { +QuicAlarm* QuicChromiumConnectionHelper::CreateAlarm( + QuicAlarm::Delegate* delegate) { return new QuicChromeAlarm(clock_, task_runner_, delegate); } -QuicBufferAllocator* QuicConnectionHelper::GetBufferAllocator() { +QuicBufferAllocator* QuicChromiumConnectionHelper::GetBufferAllocator() { return &buffer_allocator_; } diff --git a/net/quic/quic_connection_helper.h b/net/quic/quic_chromium_connection_helper.h index 83961aa..2b04649 100644 --- a/net/quic/quic_connection_helper.h +++ b/net/quic/quic_chromium_connection_helper.h @@ -8,13 +8,12 @@ #ifndef NET_QUIC_QUIC_CONNECTION_HELPER_H_ #define NET_QUIC_QUIC_CONNECTION_HELPER_H_ -#include "net/quic/quic_connection.h" - #include <set> #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "net/base/ip_endpoint.h" +#include "net/quic/quic_connection.h" #include "net/quic/quic_protocol.h" #include "net/quic/quic_simple_buffer_allocator.h" #include "net/quic/quic_time.h" @@ -29,13 +28,13 @@ namespace net { class QuicClock; class QuicRandom; -class NET_EXPORT_PRIVATE QuicConnectionHelper +class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper : public QuicConnectionHelperInterface { public: - QuicConnectionHelper(base::TaskRunner* task_runner, - const QuicClock* clock, - QuicRandom* random_generator); - ~QuicConnectionHelper() override; + QuicChromiumConnectionHelper(base::TaskRunner* task_runner, + const QuicClock* clock, + QuicRandom* random_generator); + ~QuicChromiumConnectionHelper() override; // QuicConnectionHelperInterface const QuicClock* GetClock() const override; @@ -48,9 +47,9 @@ class NET_EXPORT_PRIVATE QuicConnectionHelper const QuicClock* clock_; QuicRandom* random_generator_; SimpleBufferAllocator buffer_allocator_; - base::WeakPtrFactory<QuicConnectionHelper> weak_factory_; + base::WeakPtrFactory<QuicChromiumConnectionHelper> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(QuicConnectionHelper); + DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); }; } // namespace net diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_chromium_connection_helper_test.cc index cfe8b96..aefa22a 100644 --- a/net/quic/quic_connection_helper_test.cc +++ b/net/quic/quic_chromium_connection_helper_test.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/test_tools/mock_clock.h" #include "net/quic/test_tools/mock_random.h" @@ -29,27 +29,27 @@ class TestDelegate : public QuicAlarm::Delegate { bool fired_; }; -class QuicConnectionHelperTest : public ::testing::Test { +class QuicChromiumConnectionHelperTest : public ::testing::Test { protected: - QuicConnectionHelperTest() + QuicChromiumConnectionHelperTest() : runner_(new TestTaskRunner(&clock_)), helper_(runner_.get(), &clock_, &random_generator_) {} scoped_refptr<TestTaskRunner> runner_; - QuicConnectionHelper helper_; + QuicChromiumConnectionHelper helper_; MockClock clock_; MockRandom random_generator_; }; -TEST_F(QuicConnectionHelperTest, GetClock) { +TEST_F(QuicChromiumConnectionHelperTest, GetClock) { EXPECT_EQ(&clock_, helper_.GetClock()); } -TEST_F(QuicConnectionHelperTest, GetRandomGenerator) { +TEST_F(QuicChromiumConnectionHelperTest, GetRandomGenerator) { EXPECT_EQ(&random_generator_, helper_.GetRandomGenerator()); } -TEST_F(QuicConnectionHelperTest, CreateAlarm) { +TEST_F(QuicChromiumConnectionHelperTest, CreateAlarm) { TestDelegate* delegate = new TestDelegate(); scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate)); @@ -66,7 +66,7 @@ TEST_F(QuicConnectionHelperTest, CreateAlarm) { EXPECT_TRUE(delegate->fired()); } -TEST_F(QuicConnectionHelperTest, CreateAlarmAndCancel) { +TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndCancel) { TestDelegate* delegate = new TestDelegate(); scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate)); @@ -84,7 +84,7 @@ TEST_F(QuicConnectionHelperTest, CreateAlarmAndCancel) { EXPECT_FALSE(delegate->fired()); } -TEST_F(QuicConnectionHelperTest, CreateAlarmAndReset) { +TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndReset) { TestDelegate* delegate = new TestDelegate(); scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate)); @@ -111,7 +111,7 @@ TEST_F(QuicConnectionHelperTest, CreateAlarmAndReset) { EXPECT_TRUE(delegate->fired()); } -TEST_F(QuicConnectionHelperTest, CreateAlarmAndResetEarlier) { +TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndResetEarlier) { TestDelegate* delegate = new TestDelegate(); scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate)); @@ -140,7 +140,7 @@ TEST_F(QuicConnectionHelperTest, CreateAlarmAndResetEarlier) { EXPECT_FALSE(delegate->fired()); } -TEST_F(QuicConnectionHelperTest, CreateAlarmAndUpdate) { +TEST_F(QuicChromiumConnectionHelperTest, CreateAlarmAndUpdate) { TestDelegate* delegate = new TestDelegate(); scoped_ptr<QuicAlarm> alarm(helper_.CreateAlarm(delegate)); diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc index 11dc26c..3cc204f 100644 --- a/net/quic/quic_http_stream.cc +++ b/net/quic/quic_http_stream.cc @@ -12,8 +12,8 @@ #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/quic/quic_chromium_client_session.h" +#include "net/quic/quic_chromium_client_stream.h" #include "net/quic/quic_http_utils.h" -#include "net/quic/quic_reliable_client_stream.h" #include "net/quic/quic_utils.h" #include "net/quic/spdy_utils.h" #include "net/socket/next_proto.h" diff --git a/net/quic/quic_http_stream.h b/net/quic/quic_http_stream.h index eaed72b..7abdf8b 100644 --- a/net/quic/quic_http_stream.h +++ b/net/quic/quic_http_stream.h @@ -15,7 +15,7 @@ #include "net/base/io_buffer.h" #include "net/http/http_stream.h" #include "net/quic/quic_chromium_client_session.h" -#include "net/quic/quic_reliable_client_stream.h" +#include "net/quic/quic_chromium_client_stream.h" namespace net { @@ -24,11 +24,11 @@ class QuicHttpStreamPeer; } // namespace test // The QuicHttpStream is a QUIC-specific HttpStream subclass. It holds a -// non-owning pointer to a QuicReliableClientStream which it uses to +// non-owning pointer to a QuicChromiumClientStream which it uses to // send and receive data. class NET_EXPORT_PRIVATE QuicHttpStream : public QuicChromiumClientSession::Observer, - public QuicReliableClientStream::Delegate, + public QuicChromiumClientStream::Delegate, public HttpStream { public: explicit QuicHttpStream( @@ -65,7 +65,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream void PopulateNetErrorDetails(NetErrorDetails* details) override; void SetPriority(RequestPriority priority) override; - // QuicReliableClientStream::Delegate implementation + // QuicChromiumClientStream::Delegate implementation void OnHeadersAvailable(const SpdyHeaderBlock& headers, size_t frame_len) override; void OnDataAvailable() override; @@ -117,7 +117,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream int session_error_; // Error code from the connection shutdown. bool was_handshake_confirmed_; // True if the crypto handshake succeeded. QuicChromiumClientSession::StreamRequest stream_request_; - QuicReliableClientStream* stream_; // Non-owning. + QuicChromiumClientStream* stream_; // Non-owning. // The following three fields are all owned by the caller and must // outlive this object, according to the HttpStream contract. diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc index e514c03..a92266b 100644 --- a/net/quic/quic_http_stream_test.cc +++ b/net/quic/quic_http_stream_test.cc @@ -24,12 +24,12 @@ #include "net/quic/crypto/quic_encrypter.h" #include "net/quic/crypto/quic_server_info.h" #include "net/quic/quic_chromium_client_session.h" +#include "net/quic/quic_chromium_client_stream.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_connection.h" -#include "net/quic/quic_connection_helper.h" #include "net/quic/quic_default_packet_writer.h" #include "net/quic/quic_http_utils.h" #include "net/quic/quic_packet_reader.h" -#include "net/quic/quic_reliable_client_stream.h" #include "net/quic/quic_write_blocked_list.h" #include "net/quic/spdy_utils.h" #include "net/quic/test_tools/crypto_test_utils.h" @@ -65,7 +65,7 @@ class TestQuicConnection : public QuicConnection { TestQuicConnection(const QuicVersionVector& versions, QuicConnectionId connection_id, IPEndPoint address, - QuicConnectionHelper* helper, + QuicChromiumConnectionHelper* helper, QuicPacketWriter* writer) : QuicConnection(connection_id, address, @@ -100,7 +100,7 @@ class AutoClosingStream : public QuicHttpStream { class QuicHttpStreamPeer { public: - static QuicReliableClientStream* GetQuicReliableClientStream( + static QuicChromiumClientStream* GetQuicChromiumClientStream( QuicHttpStream* stream) { return stream->stream_; } @@ -200,8 +200,8 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> { EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) .WillRepeatedly(Return(QuicBandwidth::Zero())); EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); - helper_.reset( - new QuicConnectionHelper(runner_.get(), &clock_, &random_generator_)); + helper_.reset(new QuicChromiumConnectionHelper(runner_.get(), &clock_, + &random_generator_)); connection_ = new TestQuicConnection( SupportedVersions(GetParam()), connection_id_, peer_addr_, helper_.get(), new QuicDefaultPacketWriter(socket)); @@ -304,7 +304,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> { scoped_ptr<MockWrite[]> mock_writes_; MockClock clock_; TestQuicConnection* connection_; - scoped_ptr<QuicConnectionHelper> helper_; + scoped_ptr<QuicChromiumConnectionHelper> helper_; testing::StrictMock<MockConnectionVisitor> visitor_; scoped_ptr<QuicHttpStream> stream_; TransportSecurityState transport_security_state_; @@ -870,8 +870,8 @@ TEST_P(QuicHttpStreamTest, Priority) { callback_.callback())); // Check that priority is highest. - QuicReliableClientStream* reliable_stream = - QuicHttpStreamPeer::GetQuicReliableClientStream(stream_.get()); + QuicChromiumClientStream* reliable_stream = + QuicHttpStreamPeer::GetQuicChromiumClientStream(stream_.get()); DCHECK(reliable_stream); DCHECK_EQ(kV3HighestPriority, reliable_stream->Priority()); @@ -919,10 +919,10 @@ TEST_P(QuicHttpStreamTest, CheckPriorityWithNoDelegate) { callback_.callback())); // Check that priority is highest. - QuicReliableClientStream* reliable_stream = - QuicHttpStreamPeer::GetQuicReliableClientStream(stream_.get()); + QuicChromiumClientStream* reliable_stream = + QuicHttpStreamPeer::GetQuicChromiumClientStream(stream_.get()); DCHECK(reliable_stream); - QuicReliableClientStream::Delegate* delegate = reliable_stream->GetDelegate(); + QuicChromiumClientStream::Delegate* delegate = reliable_stream->GetDelegate(); DCHECK(delegate); DCHECK_EQ(kV3HighestPriority, reliable_stream->Priority()); diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc index 545355c..f05c1176 100644 --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc @@ -34,9 +34,9 @@ #include "net/quic/crypto/quic_server_info.h" #include "net/quic/port_suggester.h" #include "net/quic/quic_chromium_client_session.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_clock.h" #include "net/quic/quic_connection.h" -#include "net/quic/quic_connection_helper.h" #include "net/quic/quic_crypto_client_stream_factory.h" #include "net/quic/quic_default_packet_writer.h" #include "net/quic/quic_flags.h" @@ -1396,9 +1396,9 @@ int QuicStreamFactory::CreateSession(const QuicServerId& server_id, } if (!helper_.get()) { - helper_.reset( - new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), - clock_.get(), random_generator_)); + helper_.reset(new QuicChromiumConnectionHelper( + base::ThreadTaskRunnerHandle::Get().get(), clock_.get(), + random_generator_)); } QuicDefaultPacketWriter* writer = new QuicDefaultPacketWriter(socket.get()); diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h index 5a63b3e..b0a8999 100644 --- a/net/quic/quic_stream_factory.h +++ b/net/quic/quic_stream_factory.h @@ -45,7 +45,7 @@ class HostResolver; class HttpServerProperties; class QuicClock; class QuicChromiumClientSession; -class QuicConnectionHelper; +class QuicChromiumConnectionHelper; class QuicCryptoClientStreamFactory; class QuicRandom; class QuicServerId; @@ -271,7 +271,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory // It returns the amount of time waiting job should be delayed. base::TimeDelta GetTimeDelayForWaitingJob(const QuicServerId& server_id); - QuicConnectionHelper* helper() { return helper_.get(); } + QuicChromiumConnectionHelper* helper() { return helper_.get(); } bool enable_port_selection() const { return enable_port_selection_; } @@ -389,7 +389,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; // The helper used for all connections. - scoped_ptr<QuicConnectionHelper> helper_; + scoped_ptr<QuicChromiumConnectionHelper> helper_; // Contains owning pointers to all sessions that currently exist. SessionIdMap all_sessions_; diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc index babf48a..bbf797e 100644 --- a/net/tools/quic/quic_dispatcher_test.cc +++ b/net/tools/quic/quic_dispatcher_test.cc @@ -12,7 +12,7 @@ #include "net/quic/crypto/crypto_handshake.h" #include "net/quic/crypto/quic_crypto_server_config.h" #include "net/quic/crypto/quic_random.h" -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_crypto_stream.h" #include "net/quic/quic_flags.h" #include "net/quic/quic_utils.h" diff --git a/net/tools/quic/quic_server.h b/net/tools/quic/quic_server.h index bb5ace0..b2023e3 100644 --- a/net/tools/quic/quic_server.h +++ b/net/tools/quic/quic_server.h @@ -17,8 +17,8 @@ #include "base/memory/scoped_ptr.h" #include "net/base/ip_endpoint.h" #include "net/quic/crypto/quic_crypto_server_config.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_config.h" -#include "net/quic/quic_connection_helper.h" #include "net/quic/quic_framer.h" #include "net/tools/epoll_server/epoll_server.h" #include "net/tools/quic/quic_default_packet_writer.h" diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc index 3874988..4c05b67 100644 --- a/net/tools/quic/quic_simple_client.cc +++ b/net/tools/quic/quic_simple_client.cc @@ -11,8 +11,8 @@ #include "net/http/http_request_info.h" #include "net/http/http_response_info.h" #include "net/quic/crypto/quic_random.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_connection.h" -#include "net/quic/quic_connection_helper.h" #include "net/quic/quic_default_packet_writer.h" #include "net/quic/quic_flags.h" #include "net/quic/quic_packet_reader.h" @@ -377,9 +377,10 @@ QuicConnectionId QuicSimpleClient::GenerateNewConnectionId() { return helper()->GetRandomGenerator()->RandUint64(); } -QuicConnectionHelper* QuicSimpleClient::CreateQuicConnectionHelper() { - return new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), - &clock_, QuicRandom::GetInstance()); +QuicChromiumConnectionHelper* QuicSimpleClient::CreateQuicConnectionHelper() { + return new QuicChromiumConnectionHelper( + base::ThreadTaskRunnerHandle::Get().get(), &clock_, + QuicRandom::GetInstance()); } QuicPacketWriter* QuicSimpleClient::CreateQuicPacketWriter() { diff --git a/net/tools/quic/quic_simple_client.h b/net/tools/quic/quic_simple_client.h index 4f3454a..ce6e425 100644 --- a/net/tools/quic/quic_simple_client.h +++ b/net/tools/quic/quic_simple_client.h @@ -27,7 +27,7 @@ namespace net { struct HttpRequestInfo; -class QuicConnectionHelper; +class QuicChromiumConnectionHelper; class UDPClientSocket; namespace tools { @@ -166,7 +166,7 @@ class QuicSimpleClient : public QuicClientBase, const std::string& latest_response_body() const; protected: - virtual QuicConnectionHelper* CreateQuicConnectionHelper(); + virtual QuicChromiumConnectionHelper* CreateQuicConnectionHelper(); virtual QuicPacketWriter* CreateQuicPacketWriter(); private: diff --git a/net/tools/quic/quic_simple_server.cc b/net/tools/quic/quic_simple_server.cc index 722e480..755ab06 100644 --- a/net/tools/quic/quic_simple_server.cc +++ b/net/tools/quic/quic_simple_server.cc @@ -64,9 +64,10 @@ QuicSimpleServer::QuicSimpleServer(ProofSource* proof_source, const QuicConfig& config, const QuicVersionVector& supported_versions) : helper_( - new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), - &clock_, - QuicRandom::GetInstance())), + new QuicChromiumConnectionHelper(base::ThreadTaskRunnerHandle::Get() + .get(), + &clock_, + QuicRandom::GetInstance())), config_(config), crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance(), diff --git a/net/tools/quic/quic_simple_server.h b/net/tools/quic/quic_simple_server.h index bb63c7a..ba4575e 100644 --- a/net/tools/quic/quic_simple_server.h +++ b/net/tools/quic/quic_simple_server.h @@ -14,9 +14,9 @@ #include "net/base/ip_endpoint.h" #include "net/log/net_log.h" #include "net/quic/crypto/quic_crypto_server_config.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_clock.h" #include "net/quic/quic_config.h" -#include "net/quic/quic_connection_helper.h" namespace net { @@ -71,7 +71,7 @@ class QuicSimpleServer { QuicClock clock_; // Used to manage the message loop. Owned by dispatcher_. - QuicConnectionHelper* helper_; + QuicChromiumConnectionHelper* helper_; // Listening socket. Also used for outbound client communication. scoped_ptr<UDPServerSocket> socket_; diff --git a/net/tools/quic/quic_time_wait_list_manager_test.cc b/net/tools/quic/quic_time_wait_list_manager_test.cc index 90d7d33..a1c7b60 100644 --- a/net/tools/quic/quic_time_wait_list_manager_test.cc +++ b/net/tools/quic/quic_time_wait_list_manager_test.cc @@ -10,7 +10,7 @@ #include "net/quic/crypto/null_encrypter.h" #include "net/quic/crypto/quic_decrypter.h" #include "net/quic/crypto/quic_encrypter.h" -#include "net/quic/quic_connection_helper.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_data_reader.h" #include "net/quic/quic_flags.h" #include "net/quic/quic_framer.h" diff --git a/net/tools/quic/test_tools/quic_test_server.cc b/net/tools/quic/test_tools/quic_test_server.cc index 43dacf6..421952b 100644 --- a/net/tools/quic/test_tools/quic_test_server.cc +++ b/net/tools/quic/test_tools/quic_test_server.cc @@ -13,9 +13,9 @@ #include "net/quic/crypto/crypto_handshake.h" #include "net/quic/crypto/quic_crypto_server_config.h" #include "net/quic/crypto/quic_random.h" +#include "net/quic/quic_chromium_connection_helper.h" #include "net/quic/quic_config.h" #include "net/quic/quic_connection.h" -#include "net/quic/quic_connection_helper.h" #include "net/quic/quic_packet_writer.h" #include "net/quic/quic_protocol.h" #include "net/tools/quic/quic_dispatcher.h" |