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

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

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ice_connection_to_host.h" 5 #include "remoting/protocol/ice_connection_to_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "remoting/base/constants.h" 10 #include "remoting/base/constants.h"
(...skipping 15 matching lines...) Expand all
26 26
27 IceConnectionToHost::IceConnectionToHost() {} 27 IceConnectionToHost::IceConnectionToHost() {}
28 IceConnectionToHost::~IceConnectionToHost() {} 28 IceConnectionToHost::~IceConnectionToHost() {}
29 29
30 void IceConnectionToHost::Connect(scoped_ptr<Session> session, 30 void IceConnectionToHost::Connect(scoped_ptr<Session> session,
31 HostEventCallback* event_callback) { 31 HostEventCallback* event_callback) {
32 DCHECK(client_stub_); 32 DCHECK(client_stub_);
33 DCHECK(clipboard_stub_); 33 DCHECK(clipboard_stub_);
34 DCHECK(monitored_video_stub_); 34 DCHECK(monitored_video_stub_);
35 35
36 session_ = session.Pass(); 36 session_ = std::move(session);
37 session_->SetEventHandler(this); 37 session_->SetEventHandler(this);
38 38
39 event_callback_ = event_callback; 39 event_callback_ = event_callback;
40 40
41 SetState(CONNECTING, OK); 41 SetState(CONNECTING, OK);
42 } 42 }
43 43
44 const SessionConfig& IceConnectionToHost::config() { 44 const SessionConfig& IceConnectionToHost::config() {
45 return session_->config(); 45 return session_->config();
46 } 46 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 if (state != state_) { 210 if (state != state_) {
211 state_ = state; 211 state_ = state;
212 error_ = error; 212 error_ = error;
213 event_callback_->OnConnectionState(state_, error_); 213 event_callback_->OnConnectionState(state_, error_);
214 } 214 }
215 } 215 }
216 216
217 } // namespace protocol 217 } // namespace protocol
218 } // namespace remoting 218 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698