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

Side by Side Diff: net/tools/quic/quic_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_server.h ('k') | net/tools/quic/quic_server_session_base.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 (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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 epoll_server_.set_timeout_in_us(50 * 1000); 87 epoll_server_.set_timeout_in_us(50 * 1000);
88 88
89 if (!FLAGS_quic_in_memory_cache_dir.empty()) { 89 if (!FLAGS_quic_in_memory_cache_dir.empty()) {
90 QuicInMemoryCache::GetInstance()->InitializeFromDirectory( 90 QuicInMemoryCache::GetInstance()->InitializeFromDirectory(
91 FLAGS_quic_in_memory_cache_dir); 91 FLAGS_quic_in_memory_cache_dir);
92 } 92 }
93 93
94 QuicEpollClock clock(&epoll_server_); 94 QuicEpollClock clock(&epoll_server_);
95 95
96 scoped_ptr<CryptoHandshakeMessage> scfg(crypto_config_.AddDefaultConfig( 96 std::unique_ptr<CryptoHandshakeMessage> scfg(crypto_config_.AddDefaultConfig(
97 QuicRandom::GetInstance(), &clock, crypto_config_options_)); 97 QuicRandom::GetInstance(), &clock, crypto_config_options_));
98 } 98 }
99 99
100 QuicServer::~QuicServer() {} 100 QuicServer::~QuicServer() {}
101 101
102 bool QuicServer::CreateUDPSocketAndListen(const IPEndPoint& address) { 102 bool QuicServer::CreateUDPSocketAndListen(const IPEndPoint& address) {
103 fd_ = QuicSocketUtils::CreateUDPSocket(address, &overflow_supported_); 103 fd_ = QuicSocketUtils::CreateUDPSocket(address, &overflow_supported_);
104 if (fd_ < 0) { 104 if (fd_ < 0) {
105 LOG(ERROR) << "CreateSocket() failed: " << strerror(errno); 105 LOG(ERROR) << "CreateSocket() failed: " << strerror(errno);
106 return false; 106 return false;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 dispatcher_->OnCanWrite(); 177 dispatcher_->OnCanWrite();
178 if (dispatcher_->HasPendingWrites()) { 178 if (dispatcher_->HasPendingWrites()) {
179 event->out_ready_mask |= EPOLLOUT; 179 event->out_ready_mask |= EPOLLOUT;
180 } 180 }
181 } 181 }
182 if (event->in_events & EPOLLERR) { 182 if (event->in_events & EPOLLERR) {
183 } 183 }
184 } 184 }
185 185
186 } // namespace net 186 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.h ('k') | net/tools/quic/quic_server_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698