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

Side by Side Diff: net/tools/quic/test_tools/server_thread.cc

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 unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/test_tools/server_thread.h" 5 #include "net/tools/quic/test_tools/server_thread.h"
6 6
7 #include "net/quic/test_tools/crypto_test_utils.h" 7 #include "net/quic/test_tools/crypto_test_utils.h"
8 #include "net/tools/quic/quic_dispatcher.h" 8 #include "net/tools/quic/quic_dispatcher.h"
9 #include "net/tools/quic/test_tools/quic_server_peer.h" 9 #include "net/tools/quic/test_tools/quic_server_peer.h"
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void ServerThread::MaybeNotifyOfHandshakeConfirmation() { 107 void ServerThread::MaybeNotifyOfHandshakeConfirmation() {
108 if (confirmed_.IsSignaled()) { 108 if (confirmed_.IsSignaled()) {
109 // Only notify once. 109 // Only notify once.
110 return; 110 return;
111 } 111 }
112 QuicDispatcher* dispatcher = QuicServerPeer::GetDispatcher(server()); 112 QuicDispatcher* dispatcher = QuicServerPeer::GetDispatcher(server());
113 if (dispatcher->session_map().empty()) { 113 if (dispatcher->session_map().empty()) {
114 // Wait for a session to be created. 114 // Wait for a session to be created.
115 return; 115 return;
116 } 116 }
117 QuicSession* session = dispatcher->session_map().begin()->second; 117 QuicSession* session = dispatcher->session_map().begin()->second.get();
118 if (session->IsCryptoHandshakeConfirmed()) { 118 if (session->IsCryptoHandshakeConfirmed()) {
119 confirmed_.Signal(); 119 confirmed_.Signal();
120 } 120 }
121 } 121 }
122 122
123 void ServerThread::ExecuteScheduledActions() { 123 void ServerThread::ExecuteScheduledActions() {
124 std::deque<std::function<void()>> actions; 124 std::deque<std::function<void()>> actions;
125 { 125 {
126 base::AutoLock lock(scheduled_actions_lock_); 126 base::AutoLock lock(scheduled_actions_lock_);
127 actions.swap(scheduled_actions_); 127 actions.swap(scheduled_actions_);
128 } 128 }
129 while (!actions.empty()) { 129 while (!actions.empty()) {
130 actions.front()(); 130 actions.front()();
131 actions.pop_front(); 131 actions.pop_front();
132 } 132 }
133 } 133 }
134 134
135 } // namespace test 135 } // namespace test
136 } // namespace net 136 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698