| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/pairing_registry_delegate.h" | 5 #include "remoting/host/pairing_registry_delegate.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 8 | 10 |
| 9 namespace remoting { | 11 namespace remoting { |
| 10 | 12 |
| 11 using protocol::PairingRegistry; | 13 using protocol::PairingRegistry; |
| 12 | 14 |
| 13 scoped_refptr<PairingRegistry> CreatePairingRegistry( | 15 scoped_refptr<PairingRegistry> CreatePairingRegistry( |
| 14 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { | 16 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { |
| 15 scoped_refptr<PairingRegistry> pairing_registry; | 17 scoped_refptr<PairingRegistry> pairing_registry; |
| 16 scoped_ptr<PairingRegistry::Delegate> delegate( | 18 scoped_ptr<PairingRegistry::Delegate> delegate( |
| 17 CreatePairingRegistryDelegate()); | 19 CreatePairingRegistryDelegate()); |
| 18 if (delegate) { | 20 if (delegate) { |
| 19 pairing_registry = new PairingRegistry(task_runner, delegate.Pass()); | 21 pairing_registry = new PairingRegistry(task_runner, std::move(delegate)); |
| 20 } | 22 } |
| 21 return pairing_registry; | 23 return pairing_registry; |
| 22 } | 24 } |
| 23 | 25 |
| 24 } // namespace remoting | 26 } // namespace remoting |
| OLD | NEW |