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

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

Issue 2417023003: Remove stl_util's deletion functions from: (Closed)
Patch Set: internal snapshot 10 Created 4 years, 2 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/tools/quic/end_to_end_test.cc ('k') | 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 5a483ece125fa261b26547c5cf864ed3cfe39fbf..d6d284f0dbe4e7217ad4ccf79a65dfb8e405739a 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -92,8 +92,8 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
void OnPacketBeingDispatchedToSession(
QuicServerSessionBase* session) override {}
- typedef std::unordered_map<QuicConnectionId, QuicServerSessionBase*>
- SessionMap;
+ using SessionMap = std::unordered_map<QuicConnectionId,
+ std::unique_ptr<QuicServerSessionBase>>;
const SessionMap& session_map() const { return session_map_; }
@@ -277,7 +277,9 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
// 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
// true, any future packets for the ConnectionId will be black-holed.
- void CleanUpSession(SessionMap::iterator it, bool session_closed_statelessly);
+ void CleanUpSession(SessionMap::iterator it,
+ QuicConnection* connection,
+ bool session_closed_statelessly);
bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header);
@@ -336,7 +338,7 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
std::unique_ptr<QuicTimeWaitListManager> time_wait_list_manager_;
// The list of closed but not-yet-deleted sessions.
- std::vector<QuicServerSessionBase*> closed_session_list_;
+ std::vector<std::unique_ptr<QuicServerSessionBase>> closed_session_list_;
// The helper used for all connections.
std::unique_ptr<QuicConnectionHelperInterface> helper_;
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698