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

Side by Side Diff: net/tools/quic/quic_simple_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_simple_server.h" 5 #include "net/tools/quic/quic_simple_server.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void set_shared_writer(QuicSimpleServerPacketWriter* shared_writer) { 56 void set_shared_writer(QuicSimpleServerPacketWriter* shared_writer) {
57 shared_writer_ = shared_writer; 57 shared_writer_ = shared_writer;
58 } 58 }
59 59
60 private: 60 private:
61 QuicSimpleServerPacketWriter* shared_writer_; // Not owned. 61 QuicSimpleServerPacketWriter* shared_writer_; // Not owned.
62 }; 62 };
63 63
64 } // namespace 64 } // namespace
65 65
66 QuicSimpleServer::QuicSimpleServer(const QuicConfig& config, 66 QuicSimpleServer::QuicSimpleServer(ProofSource* proof_source,
67 const QuicConfig& config,
67 const QuicVersionVector& supported_versions) 68 const QuicVersionVector& supported_versions)
68 : helper_(base::ThreadTaskRunnerHandle::Get().get(), 69 : helper_(base::ThreadTaskRunnerHandle::Get().get(),
69 &clock_, 70 &clock_,
70 QuicRandom::GetInstance()), 71 QuicRandom::GetInstance()),
71 config_(config), 72 config_(config),
72 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance()), 73 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance(),
74 proof_source),
73 supported_versions_(supported_versions), 75 supported_versions_(supported_versions),
74 read_pending_(false), 76 read_pending_(false),
75 synchronous_read_count_(0), 77 synchronous_read_count_(0),
76 read_buffer_(new IOBufferWithSize(kReadBufferSize)), 78 read_buffer_(new IOBufferWithSize(kReadBufferSize)),
77 weak_factory_(this) { 79 weak_factory_(this) {
78 Initialize(); 80 Initialize();
79 } 81 }
80 82
81 void QuicSimpleServer::Initialize() { 83 void QuicSimpleServer::Initialize() {
82 #if MMSG_MORE 84 #if MMSG_MORE
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 215 }
214 216
215 QuicEncryptedPacket packet(read_buffer_->data(), result, false); 217 QuicEncryptedPacket packet(read_buffer_->data(), result, false);
216 dispatcher_->ProcessPacket(server_address_, client_address_, packet); 218 dispatcher_->ProcessPacket(server_address_, client_address_, packet);
217 219
218 StartReading(); 220 StartReading();
219 } 221 }
220 222
221 } // namespace tools 223 } // namespace tools
222 } // namespace net 224 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698