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

Side by Side Diff: remoting/host/gnubby_auth_handler_posix.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> Created 4 years, 12 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 | « remoting/host/gcd_state_updater_unittest.cc ('k') | remoting/host/gnubby_socket.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 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 "remoting/host/gnubby_auth_handler_posix.h" 5 #include "remoting/host/gnubby_auth_handler_posix.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 DCHECK(CalledOnValidThread()); 203 DCHECK(CalledOnValidThread());
204 DCHECK_NE(net::ERR_IO_PENDING, result); 204 DCHECK_NE(net::ERR_IO_PENDING, result);
205 205
206 if (result < 0) { 206 if (result < 0) {
207 LOG(ERROR) << "Error in accepting a new connection"; 207 LOG(ERROR) << "Error in accepting a new connection";
208 return; 208 return;
209 } 209 }
210 210
211 int connection_id = ++last_connection_id_; 211 int connection_id = ++last_connection_id_;
212 GnubbySocket* socket = 212 GnubbySocket* socket =
213 new GnubbySocket(accept_socket_.Pass(), request_timeout_, 213 new GnubbySocket(std::move(accept_socket_), request_timeout_,
214 base::Bind(&GnubbyAuthHandlerPosix::RequestTimedOut, 214 base::Bind(&GnubbyAuthHandlerPosix::RequestTimedOut,
215 base::Unretained(this), connection_id)); 215 base::Unretained(this), connection_id));
216 active_sockets_[connection_id] = socket; 216 active_sockets_[connection_id] = socket;
217 socket->StartReadingRequest( 217 socket->StartReadingRequest(
218 base::Bind(&GnubbyAuthHandlerPosix::OnReadComplete, 218 base::Bind(&GnubbyAuthHandlerPosix::OnReadComplete,
219 base::Unretained(this), connection_id)); 219 base::Unretained(this), connection_id));
220 220
221 // Continue accepting new connections. 221 // Continue accepting new connections.
222 DoAccept(); 222 DoAccept();
223 } 223 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 void GnubbyAuthHandlerPosix::RequestTimedOut(int connection_id) { 295 void GnubbyAuthHandlerPosix::RequestTimedOut(int connection_id) {
296 HOST_LOG << "Gnubby request timed out"; 296 HOST_LOG << "Gnubby request timed out";
297 ActiveSockets::iterator iter = active_sockets_.find(connection_id); 297 ActiveSockets::iterator iter = active_sockets_.find(connection_id);
298 if (iter != active_sockets_.end()) 298 if (iter != active_sockets_.end())
299 SendErrorAndCloseActiveSocket(iter); 299 SendErrorAndCloseActiveSocket(iter);
300 } 300 }
301 301
302 } // namespace remoting 302 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/gcd_state_updater_unittest.cc ('k') | remoting/host/gnubby_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698