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

Unified Diff: net/quic/quic_server_bin.cc

Issue 1032903002: Unify various QUIC server classes in net/quic and net/tools/quic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 months 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/quic/quic_server.cc ('k') | net/quic/quic_server_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_bin.cc
diff --git a/net/quic/quic_server_bin.cc b/net/quic/quic_server_bin.cc
index 53ec9bb064697501b22a21d14fc9db74c99c2d60..8d6f47a1e1c05ac874828f1fe8807f2382fcf368 100644
--- a/net/quic/quic_server_bin.cc
+++ b/net/quic/quic_server_bin.cc
@@ -14,14 +14,17 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/ip_endpoint.h"
-#include "net/quic/quic_in_memory_cache.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_server.h"
+#include "net/tools/quic/quic_in_memory_cache.h"
// The port the quic server will listen on.
int32 FLAGS_port = 6121;
int main(int argc, char *argv[]) {
+ base::AtExitManager exit_manager;
+ base::MessageLoopForIO message_loop;
+
base::CommandLine::Init(argc, argv);
base::CommandLine* line = base::CommandLine::ForCurrentProcess();
@@ -43,8 +46,8 @@ int main(int argc, char *argv[]) {
}
if (line->HasSwitch("quic_in_memory_cache_dir")) {
- net::g_quic_in_memory_cache_dir =
- line->GetSwitchValueNative("quic_in_memory_cache_dir");
+ net::tools::QuicInMemoryCache::GetInstance()->InitializeFromDirectory(
+ line->GetSwitchValueNative("quic_in_memory_cache_dir"));
}
if (line->HasSwitch("port")) {
@@ -54,9 +57,6 @@ int main(int argc, char *argv[]) {
}
}
- base::AtExitManager exit_manager;
- base::MessageLoopForIO message_loop;
-
net::IPAddressNumber ip;
CHECK(net::ParseIPLiteralToNumber("::", &ip));
« no previous file with comments | « net/quic/quic_server.cc ('k') | net/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698