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

Side by Side Diff: remoting/protocol/fake_stream_socket.cc

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "remoting/protocol/fake_stream_socket.h" 5 #include "remoting/protocol/fake_stream_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } else { 259 } else {
260 NotifyChannelCreated(channel.Pass(), name, callback); 260 NotifyChannelCreated(channel.Pass(), name, callback);
261 } 261 }
262 } 262 }
263 263
264 void FakeStreamChannelFactory::NotifyChannelCreated( 264 void FakeStreamChannelFactory::NotifyChannelCreated(
265 scoped_ptr<FakeStreamSocket> owned_channel, 265 scoped_ptr<FakeStreamSocket> owned_channel,
266 const std::string& name, 266 const std::string& name,
267 const ChannelCreatedCallback& callback) { 267 const ChannelCreatedCallback& callback) {
268 if (channels_.find(name) != channels_.end()) 268 if (channels_.find(name) != channels_.end())
269 callback.Run(owned_channel.PassAs<net::StreamSocket>()); 269 callback.Run(owned_channel.Pass());
270 } 270 }
271 271
272 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) { 272 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) {
273 channels_.erase(name); 273 channels_.erase(name);
274 } 274 }
275 275
276 } // namespace protocol 276 } // namespace protocol
277 } // namespace remoting 277 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698