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

Unified Diff: net/tools/quic/quic_simple_server.cc

Issue 2518063007: Pass QuicInMemoryCache directly instead of using a singleton. (Closed)
Patch Set: Fix Cronet compile error Created 4 years, 1 month 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/quic_simple_server.h ('k') | net/tools/quic/quic_simple_server_bin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server.cc
diff --git a/net/tools/quic/quic_simple_server.cc b/net/tools/quic/quic_simple_server.cc
index 273fb45f3eef0c96c72c54ff693194f8a522dda5..3af6bb2560e8efb901ea387bd92953df2a20b8fd 100644
--- a/net/tools/quic/quic_simple_server.cc
+++ b/net/tools/quic/quic_simple_server.cc
@@ -40,7 +40,8 @@ QuicSimpleServer::QuicSimpleServer(
std::unique_ptr<ProofSource> proof_source,
const QuicConfig& config,
const QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
- const QuicVersionVector& supported_versions)
+ const QuicVersionVector& supported_versions,
+ QuicInMemoryCache* in_memory_cache)
: version_manager_(supported_versions),
helper_(
new QuicChromiumConnectionHelper(&clock_, QuicRandom::GetInstance())),
@@ -55,6 +56,7 @@ QuicSimpleServer::QuicSimpleServer(
read_pending_(false),
synchronous_read_count_(0),
read_buffer_(new IOBufferWithSize(kReadBufferSize)),
+ in_memory_cache_(in_memory_cache),
weak_factory_(this) {
Initialize();
}
@@ -129,7 +131,7 @@ int QuicSimpleServer::Listen(const IPEndPoint& address) {
std::unique_ptr<QuicConnectionHelperInterface>(helper_),
std::unique_ptr<QuicCryptoServerStream::Helper>(
new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
- std::unique_ptr<QuicAlarmFactory>(alarm_factory_)));
+ std::unique_ptr<QuicAlarmFactory>(alarm_factory_), in_memory_cache_));
QuicSimpleServerPacketWriter* writer =
new QuicSimpleServerPacketWriter(socket_.get(), dispatcher_.get());
dispatcher_->InitializeWithWriter(writer);
« no previous file with comments | « net/tools/quic/quic_simple_server.h ('k') | net/tools/quic/quic_simple_server_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698