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

Unified Diff: net/tools/quic/quic_server_bin.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_server.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server_bin.cc
diff --git a/net/tools/quic/quic_server_bin.cc b/net/tools/quic/quic_server_bin.cc
index d2a6d49613a0edfab0a7f26e6296db7af6e5faac..2b4528ca2bf71309aacf5e49f08f7bae34d22a3c 100644
--- a/net/tools/quic/quic_server_bin.cc
+++ b/net/tools/quic/quic_server_bin.cc
@@ -56,8 +56,9 @@ int main(int argc, char* argv[]) {
exit(0);
}
+ net::QuicInMemoryCache in_memory_cache;
if (line->HasSwitch("quic_in_memory_cache_dir")) {
- net::QuicInMemoryCache::GetInstance()->InitializeFromDirectory(
+ in_memory_cache.InitializeFromDirectory(
line->GetSwitchValueASCII("quic_in_memory_cache_dir"));
}
@@ -83,7 +84,7 @@ int main(int argc, char* argv[]) {
CreateProofSource(line->GetSwitchValuePath("certificate_file"),
line->GetSwitchValuePath("key_file")),
config, net::QuicCryptoServerConfig::ConfigOptions(),
- net::AllSupportedVersions());
+ net::AllSupportedVersions(), &in_memory_cache);
int rc = server.CreateUDPSocketAndListen(
net::QuicSocketAddress(net::QuicIpAddress::Any6(), FLAGS_port));
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698