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

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

Issue 2319933003: Move StatelessRejector to a heap-allocated model (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.h
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h
index fc62b03f60d6deb885c094a05765503301abfb7e..59f229bbffa1c7d461802193d8ec92b5bbc45da0 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -22,6 +22,8 @@
#include "net/quic/core/quic_connection.h"
#include "net/quic/core/quic_protocol.h"
#include "net/quic/core/quic_server_session_base.h"
+
+#include "net/tools/quic/stateless_rejector.h"
#include "net/tools/quic/quic_process_packet_interface.h"
#include "net/tools/quic/quic_time_wait_list_manager.h"
@@ -266,6 +268,7 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
private:
friend class net::test::QuicDispatcherPeer;
+ friend class StatelessRejectorProcessDoneCallback;
// Removes the session from the session map and write blocked list, and adds
// the ConnectionId to the time-wait list. If |session_closed_statelessly| is
@@ -275,11 +278,11 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header);
// Attempts to reject the connection statelessly, if stateless rejects are
- // possible and if the current packet contains a CHLO message.
- // Returns a fate which describes what subsequent processing should be
- // performed on the packets, like ValidityChecks.
- QuicPacketFate MaybeRejectStatelessly(QuicConnectionId connection_id,
- const QuicPacketHeader& header);
+ // possible and if the current packet contains a CHLO message. Determines a
+ // fate which describes what subsequent processing should be performed on the
+ // packets, like ValidityChecks, and invokes ProcessUnauthenticatedHeaderFate.
+ void MaybeRejectStatelessly(QuicConnectionId connection_id,
+ const QuicPacketHeader& header);
// Deliver |packets| to |session| for further processing.
void DeliverPacketsToSession(
@@ -292,6 +295,12 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
QuicConnectionId connection_id,
QuicPacketNumber packet_number);
+ // Invoked when StatelessRejector::Process completes.
+ void OnStatelessRejectorProcessDone(
+ std::unique_ptr<StatelessRejector> rejector,
+ QuicPacketNumber packet_number,
+ QuicVersion first_version);
+
void set_new_sessions_allowed_per_event_loop(
int16_t new_sessions_allowed_per_event_loop) {
new_sessions_allowed_per_event_loop_ = new_sessions_allowed_per_event_loop;
« no previous file with comments | « no previous file | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698