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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac 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 | « remoting/protocol/channel_dispatcher_base.h ('k') | remoting/protocol/channel_multiplexer.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 "remoting/protocol/channel_dispatcher_base.h" 5 #include "remoting/protocol/channel_dispatcher_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "remoting/base/compound_buffer.h" 10 #include "remoting/base/compound_buffer.h"
(...skipping 14 matching lines...) Expand all
25 void ChannelDispatcherBase::Init(MessageChannelFactory* channel_factory, 25 void ChannelDispatcherBase::Init(MessageChannelFactory* channel_factory,
26 EventHandler* event_handler) { 26 EventHandler* event_handler) {
27 channel_factory_ = channel_factory; 27 channel_factory_ = channel_factory;
28 event_handler_ = event_handler; 28 event_handler_ = event_handler;
29 29
30 channel_factory_->CreateChannel(channel_name_, base::Bind( 30 channel_factory_->CreateChannel(channel_name_, base::Bind(
31 &ChannelDispatcherBase::OnChannelReady, base::Unretained(this))); 31 &ChannelDispatcherBase::OnChannelReady, base::Unretained(this)));
32 } 32 }
33 33
34 void ChannelDispatcherBase::OnChannelReady( 34 void ChannelDispatcherBase::OnChannelReady(
35 scoped_ptr<MessagePipe> message_pipe) { 35 std::unique_ptr<MessagePipe> message_pipe) {
36 channel_factory_ = nullptr; 36 channel_factory_ = nullptr;
37 message_pipe_ = std::move(message_pipe); 37 message_pipe_ = std::move(message_pipe);
38 message_pipe_->StartReceiving(base::Bind( 38 message_pipe_->StartReceiving(base::Bind(
39 &ChannelDispatcherBase::OnIncomingMessage, base::Unretained(this))); 39 &ChannelDispatcherBase::OnIncomingMessage, base::Unretained(this)));
40 40
41 event_handler_->OnChannelInitialized(this); 41 event_handler_->OnChannelInitialized(this);
42 } 42 }
43 43
44 } // namespace protocol 44 } // namespace protocol
45 } // namespace remoting 45 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/channel_dispatcher_base.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698