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

Unified Diff: net/tools/quic/quic_server.h

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_in_memory_cache_test.cc ('k') | net/tools/quic/quic_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server.h
diff --git a/net/tools/quic/quic_server.h b/net/tools/quic/quic_server.h
index 825a77fd536058b8a5119c87482acf579ebedaad..5e0db6b4fd19b60f25d3bf7fab6ffb7f516d7947 100644
--- a/net/tools/quic/quic_server.h
+++ b/net/tools/quic/quic_server.h
@@ -23,6 +23,7 @@
#include "net/quic/platform/api/quic_socket_address.h"
#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_default_packet_writer.h"
+#include "net/tools/quic/quic_in_memory_cache.h"
namespace net {
@@ -35,11 +36,13 @@ class QuicPacketReader;
class QuicServer : public EpollCallbackInterface {
public:
- explicit QuicServer(std::unique_ptr<ProofSource> proof_source);
+ QuicServer(std::unique_ptr<ProofSource> proof_source,
+ QuicInMemoryCache* in_memory_cache);
QuicServer(std::unique_ptr<ProofSource> proof_source,
const QuicConfig& config,
const QuicCryptoServerConfig::ConfigOptions& server_config_options,
- const QuicVersionVector& supported_versions);
+ const QuicVersionVector& supported_versions,
+ QuicInMemoryCache* in_memory_cache);
~QuicServer() override;
@@ -83,6 +86,8 @@ class QuicServer : public EpollCallbackInterface {
QuicVersionManager* version_manager() { return &version_manager_; }
+ QuicInMemoryCache* in_memory_cache() { return in_memory_cache_; }
+
private:
friend class net::test::QuicServerPeer;
@@ -124,6 +129,8 @@ class QuicServer : public EpollCallbackInterface {
// space than allowed on the stack.
std::unique_ptr<QuicPacketReader> packet_reader_;
+ QuicInMemoryCache* in_memory_cache_; // unowned.
+
DISALLOW_COPY_AND_ASSIGN(QuicServer);
};
« no previous file with comments | « net/tools/quic/quic_in_memory_cache_test.cc ('k') | net/tools/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698