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

Unified Diff: net/tools/quic/test_tools/quic_test_server.cc

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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 | « net/tools/quic/test_tools/quic_test_server.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_server.cc
diff --git a/net/tools/quic/test_tools/quic_test_server.cc b/net/tools/quic/test_tools/quic_test_server.cc
index 2fb27b35eded20ef8485b41f5c51c62dea6df908..e5375fffee7cecdede52b70777fc028b0d966030 100644
--- a/net/tools/quic/test_tools/quic_test_server.cc
+++ b/net/tools/quic/test_tools/quic_test_server.cc
@@ -17,7 +17,7 @@
#include "net/quic/core/quic_config.h"
#include "net/quic/core/quic_connection.h"
#include "net/quic/core/quic_packet_writer.h"
-#include "net/quic/core/quic_protocol.h"
+#include "net/quic/core/quic_packets.h"
#include "net/tools/quic/quic_epoll_alarm_factory.h"
#include "net/tools/quic/quic_epoll_connection_helper.h"
#include "net/tools/quic/quic_simple_crypto_server_stream_helper.h"
@@ -39,14 +39,14 @@ class CustomStreamSession : public QuicSimpleServerSession {
QuicCompressedCertsCache* compressed_certs_cache,
QuicTestServer::StreamFactory* stream_factory,
QuicTestServer::CryptoStreamFactory* crypto_stream_factory,
- QuicInMemoryCache* in_memory_cache)
+ QuicHttpResponseCache* response_cache)
: QuicSimpleServerSession(config,
connection,
visitor,
helper,
crypto_config,
compressed_certs_cache,
- in_memory_cache),
+ response_cache),
stream_factory_(stream_factory),
crypto_stream_factory_(crypto_stream_factory) {}
@@ -56,7 +56,7 @@ class CustomStreamSession : public QuicSimpleServerSession {
}
if (stream_factory_) {
QuicSpdyStream* stream =
- stream_factory_->CreateStream(id, this, in_memory_cache());
+ stream_factory_->CreateStream(id, this, response_cache());
ActivateStream(base::WrapUnique(stream));
return stream;
}
@@ -87,14 +87,14 @@ class QuicTestDispatcher : public QuicSimpleDispatcher {
std::unique_ptr<QuicConnectionHelperInterface> helper,
std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
std::unique_ptr<QuicAlarmFactory> alarm_factory,
- QuicInMemoryCache* in_memory_cache)
+ QuicHttpResponseCache* response_cache)
: QuicSimpleDispatcher(config,
crypto_config,
version_manager,
std::move(helper),
std::move(session_helper),
std::move(alarm_factory),
- in_memory_cache),
+ response_cache),
session_factory_(nullptr),
stream_factory_(nullptr),
crypto_stream_factory_(nullptr) {}
@@ -117,11 +117,11 @@ class QuicTestDispatcher : public QuicSimpleDispatcher {
session = new CustomStreamSession(
config(), connection, this, session_helper(), crypto_config(),
compressed_certs_cache(), stream_factory_, crypto_stream_factory_,
- in_memory_cache());
+ response_cache());
} else {
session = session_factory_->CreateSession(
config(), connection, this, session_helper(), crypto_config(),
- compressed_certs_cache(), in_memory_cache());
+ compressed_certs_cache(), response_cache());
}
session->Initialize();
return session;
@@ -157,18 +157,18 @@ class QuicTestDispatcher : public QuicSimpleDispatcher {
};
QuicTestServer::QuicTestServer(std::unique_ptr<ProofSource> proof_source,
- QuicInMemoryCache* in_memory_cache)
- : QuicServer(std::move(proof_source), in_memory_cache) {}
+ QuicHttpResponseCache* response_cache)
+ : QuicServer(std::move(proof_source), response_cache) {}
QuicTestServer::QuicTestServer(std::unique_ptr<ProofSource> proof_source,
const QuicConfig& config,
const QuicVersionVector& supported_versions,
- QuicInMemoryCache* in_memory_cache)
+ QuicHttpResponseCache* response_cache)
: QuicServer(std::move(proof_source),
config,
QuicCryptoServerConfig::ConfigOptions(),
supported_versions,
- in_memory_cache) {}
+ response_cache) {}
QuicDispatcher* QuicTestServer::CreateQuicDispatcher() {
return new QuicTestDispatcher(
@@ -179,7 +179,7 @@ QuicDispatcher* QuicTestServer::CreateQuicDispatcher() {
new QuicSimpleCryptoServerStreamHelper(QuicRandom::GetInstance())),
std::unique_ptr<QuicEpollAlarmFactory>(
new QuicEpollAlarmFactory(epoll_server())),
- in_memory_cache());
+ response_cache());
}
void QuicTestServer::SetSessionFactory(SessionFactory* factory) {
@@ -205,14 +205,14 @@ ImmediateGoAwaySession::ImmediateGoAwaySession(
QuicCryptoServerStream::Helper* helper,
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache,
- QuicInMemoryCache* in_memory_cache)
+ QuicHttpResponseCache* response_cache)
: QuicSimpleServerSession(config,
connection,
visitor,
helper,
crypto_config,
compressed_certs_cache,
- in_memory_cache) {}
+ response_cache) {}
void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) {
SendGoAway(QUIC_PEER_GOING_AWAY, "");
« no previous file with comments | « net/tools/quic/test_tools/quic_test_server.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698