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

Unified Diff: net/tools/quic/quic_simple_dispatcher.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_server_test.cc ('k') | net/tools/quic/quic_simple_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_dispatcher.h
diff --git a/net/tools/quic/quic_simple_dispatcher.h b/net/tools/quic/quic_simple_dispatcher.h
index 621df93b7669451af29d74a20561eb3404adff5a..3f4ef135d35f400fdea1501c14e8bb4e80d2f763 100644
--- a/net/tools/quic/quic_simple_dispatcher.h
+++ b/net/tools/quic/quic_simple_dispatcher.h
@@ -7,6 +7,7 @@
#include "net/quic/core/quic_server_session_base.h"
#include "net/tools/quic/quic_dispatcher.h"
+#include "net/tools/quic/quic_in_memory_cache.h"
namespace net {
@@ -18,7 +19,8 @@ class QuicSimpleDispatcher : public QuicDispatcher {
QuicVersionManager* version_manager,
std::unique_ptr<QuicConnectionHelperInterface> helper,
std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
- std::unique_ptr<QuicAlarmFactory> alarm_factory);
+ std::unique_ptr<QuicAlarmFactory> alarm_factory,
+ QuicInMemoryCache* in_memory_cache);
~QuicSimpleDispatcher() override;
@@ -26,6 +28,11 @@ class QuicSimpleDispatcher : public QuicDispatcher {
QuicServerSessionBase* CreateQuicSession(
QuicConnectionId connection_id,
const QuicSocketAddress& client_address) override;
+
+ QuicInMemoryCache* in_memory_cache() { return in_memory_cache_; }
+
+ private:
+ QuicInMemoryCache* in_memory_cache_; // Unowned.
};
} // namespace net
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_simple_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698