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

Side by Side Diff: remoting/protocol/fake_datagram_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_datagram_socket.h" 5 #include "remoting/protocol/fake_datagram_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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } else { 151 } else {
152 NotifyChannelCreated(channel.Pass(), name, callback); 152 NotifyChannelCreated(channel.Pass(), name, callback);
153 } 153 }
154 } 154 }
155 155
156 void FakeDatagramChannelFactory::NotifyChannelCreated( 156 void FakeDatagramChannelFactory::NotifyChannelCreated(
157 scoped_ptr<FakeDatagramSocket> owned_socket, 157 scoped_ptr<FakeDatagramSocket> owned_socket,
158 const std::string& name, 158 const std::string& name,
159 const ChannelCreatedCallback& callback) { 159 const ChannelCreatedCallback& callback) {
160 if (channels_.find(name) != channels_.end()) 160 if (channels_.find(name) != channels_.end())
161 callback.Run(owned_socket.PassAs<net::Socket>()); 161 callback.Run(owned_socket.Pass());
162 } 162 }
163 163
164 void FakeDatagramChannelFactory::CancelChannelCreation( 164 void FakeDatagramChannelFactory::CancelChannelCreation(
165 const std::string& name) { 165 const std::string& name) {
166 channels_.erase(name); 166 channels_.erase(name);
167 } 167 }
168 168
169 } // namespace protocol 169 } // namespace protocol
170 } // namespace remoting 170 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698