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

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

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 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_simple_server.h ('k') | net/tools/quic/quic_simple_server_session.h » ('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 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 kMinimumFlowControlSendWindow) { 92 kMinimumFlowControlSendWindow) {
93 config_.SetInitialStreamFlowControlWindowToSend( 93 config_.SetInitialStreamFlowControlWindowToSend(
94 kInitialStreamFlowControlWindow); 94 kInitialStreamFlowControlWindow);
95 } 95 }
96 if (config_.GetInitialSessionFlowControlWindowToSend() == 96 if (config_.GetInitialSessionFlowControlWindowToSend() ==
97 kMinimumFlowControlSendWindow) { 97 kMinimumFlowControlSendWindow) {
98 config_.SetInitialSessionFlowControlWindowToSend( 98 config_.SetInitialSessionFlowControlWindowToSend(
99 kInitialSessionFlowControlWindow); 99 kInitialSessionFlowControlWindow);
100 } 100 }
101 101
102 scoped_ptr<CryptoHandshakeMessage> scfg(crypto_config_.AddDefaultConfig( 102 std::unique_ptr<CryptoHandshakeMessage> scfg(crypto_config_.AddDefaultConfig(
103 helper_->GetRandomGenerator(), helper_->GetClock(), 103 helper_->GetRandomGenerator(), helper_->GetClock(),
104 QuicCryptoServerConfig::ConfigOptions())); 104 QuicCryptoServerConfig::ConfigOptions()));
105 } 105 }
106 106
107 QuicSimpleServer::~QuicSimpleServer() {} 107 QuicSimpleServer::~QuicSimpleServer() {}
108 108
109 int QuicSimpleServer::Listen(const IPEndPoint& address) { 109 int QuicSimpleServer::Listen(const IPEndPoint& address) {
110 scoped_ptr<UDPServerSocket> socket( 110 std::unique_ptr<UDPServerSocket> socket(
111 new UDPServerSocket(&net_log_, NetLog::Source())); 111 new UDPServerSocket(&net_log_, NetLog::Source()));
112 112
113 socket->AllowAddressReuse(); 113 socket->AllowAddressReuse();
114 114
115 int rc = socket->Listen(address); 115 int rc = socket->Listen(address);
116 if (rc < 0) { 116 if (rc < 0) {
117 LOG(ERROR) << "Listen() failed: " << ErrorToString(rc); 117 LOG(ERROR) << "Listen() failed: " << ErrorToString(rc);
118 return rc; 118 return rc;
119 } 119 }
120 120
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 QuicReceivedPacket packet(read_buffer_->data(), result, 205 QuicReceivedPacket packet(read_buffer_->data(), result,
206 helper_->GetClock()->Now(), false); 206 helper_->GetClock()->Now(), false);
207 dispatcher_->ProcessPacket(server_address_, client_address_, packet); 207 dispatcher_->ProcessPacket(server_address_, client_address_, packet);
208 208
209 StartReading(); 209 StartReading();
210 } 210 }
211 211
212 } // namespace net 212 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server.h ('k') | net/tools/quic/quic_simple_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698