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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 #include <features.h> 8 #include <features.h>
9 #include <netinet/in.h> 9 #include <netinet/in.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 29 matching lines...) Expand all
40 // Specifies the directory used during QuicInMemoryCache 40 // Specifies the directory used during QuicInMemoryCache
41 // construction to seed the cache. Cache directory can be 41 // construction to seed the cache. Cache directory can be
42 // generated using `wget -p --save-headers <url>` 42 // generated using `wget -p --save-headers <url>`
43 std::string FLAGS_quic_in_memory_cache_dir = ""; 43 std::string FLAGS_quic_in_memory_cache_dir = "";
44 44
45 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET; 45 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET;
46 const char kSourceAddressTokenSecret[] = "secret"; 46 const char kSourceAddressTokenSecret[] = "secret";
47 47
48 } // namespace 48 } // namespace
49 49
50 QuicServer::QuicServer() : QuicServer(QuicConfig(), QuicSupportedVersions()) {} 50 QuicServer::QuicServer(ProofSource* proof_source)
51 : QuicServer(proof_source, QuicConfig(), QuicSupportedVersions()) {}
51 52
52 QuicServer::QuicServer(const QuicConfig& config, 53 QuicServer::QuicServer(ProofSource* proof_source, const QuicConfig& config,
53 const QuicVersionVector& supported_versions) 54 const QuicVersionVector& supported_versions)
54 : port_(0), 55 : port_(0),
55 fd_(-1), 56 fd_(-1),
56 packets_dropped_(0), 57 packets_dropped_(0),
57 overflow_supported_(false), 58 overflow_supported_(false),
58 use_recvmmsg_(false), 59 use_recvmmsg_(false),
59 config_(config), 60 config_(config),
60 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance()), 61 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance(),
62 proof_source),
61 supported_versions_(supported_versions), 63 supported_versions_(supported_versions),
62 packet_reader_(new QuicPacketReader()) { 64 packet_reader_(new QuicPacketReader()) {
63 Initialize(); 65 Initialize();
64 } 66 }
65 67
66 void QuicServer::Initialize() { 68 void QuicServer::Initialize() {
67 #if MMSG_MORE 69 #if MMSG_MORE
68 use_recvmmsg_ = true; 70 use_recvmmsg_ = true;
69 #endif 71 #endif
70 72
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (dispatcher_->HasPendingWrites()) { 225 if (dispatcher_->HasPendingWrites()) {
224 event->out_ready_mask |= EPOLLOUT; 226 event->out_ready_mask |= EPOLLOUT;
225 } 227 }
226 } 228 }
227 if (event->in_events & EPOLLERR) { 229 if (event->in_events & EPOLLERR) {
228 } 230 }
229 } 231 }
230 232
231 } // namespace tools 233 } // namespace tools
232 } // namespace net 234 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698