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

Side by Side Diff: net/tools/quic/quic_server.cc

Issue 1048483002: Pass QuicCryptoServerConfig by pointer instead of reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_test.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic_server.h" 5 #include "net/tools/quic/quic_server.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #ifndef __APPLE__ 8 #ifndef __APPLE__
9 // This is a GNU header that is not present in /usr/include on MacOS 9 // This is a GNU header that is not present in /usr/include on MacOS
10 #include <features.h> 10 #include <features.h>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return true; 188 return true;
189 } 189 }
190 190
191 QuicDefaultPacketWriter* QuicServer::CreateWriter(int fd) { 191 QuicDefaultPacketWriter* QuicServer::CreateWriter(int fd) {
192 return new QuicDefaultPacketWriter(fd); 192 return new QuicDefaultPacketWriter(fd);
193 } 193 }
194 194
195 QuicDispatcher* QuicServer::CreateQuicDispatcher() { 195 QuicDispatcher* QuicServer::CreateQuicDispatcher() {
196 return new QuicDispatcher( 196 return new QuicDispatcher(
197 config_, 197 config_,
198 crypto_config_, 198 &crypto_config_,
199 supported_versions_, 199 supported_versions_,
200 new QuicDispatcher::DefaultPacketWriterFactory(), 200 new QuicDispatcher::DefaultPacketWriterFactory(),
201 new QuicEpollConnectionHelper(&epoll_server_)); 201 new QuicEpollConnectionHelper(&epoll_server_));
202 } 202 }
203 203
204 void QuicServer::WaitForEvents() { 204 void QuicServer::WaitForEvents() {
205 epoll_server_.WaitForEventsAndExecuteCallbacks(); 205 epoll_server_.WaitForEventsAndExecuteCallbacks();
206 } 206 }
207 207
208 void QuicServer::Shutdown() { 208 void QuicServer::Shutdown() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 IPEndPoint server_address(server_ip, port); 287 IPEndPoint server_address(server_ip, port);
288 processor->ProcessPacket(server_address, client_address, packet); 288 processor->ProcessPacket(server_address, client_address, packet);
289 289
290 // The socket read was successful, so return true even if packet dispatch 290 // The socket read was successful, so return true even if packet dispatch
291 // failed. 291 // failed.
292 return true; 292 return true;
293 } 293 }
294 294
295 } // namespace tools 295 } // namespace tools
296 } // namespace net 296 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698