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

Side by Side Diff: remoting/host/pairing_registry_delegate.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
OLDNEW
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> 7 #include <utility>
8 8
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 using protocol::PairingRegistry; 13 using protocol::PairingRegistry;
14 14
15 scoped_refptr<PairingRegistry> CreatePairingRegistry( 15 scoped_refptr<PairingRegistry> CreatePairingRegistry(
16 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 16 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
17 scoped_refptr<PairingRegistry> pairing_registry; 17 scoped_refptr<PairingRegistry> pairing_registry;
18 scoped_ptr<PairingRegistry::Delegate> delegate( 18 std::unique_ptr<PairingRegistry::Delegate> delegate(
19 CreatePairingRegistryDelegate()); 19 CreatePairingRegistryDelegate());
20 if (delegate) { 20 if (delegate) {
21 pairing_registry = new PairingRegistry(task_runner, std::move(delegate)); 21 pairing_registry = new PairingRegistry(task_runner, std::move(delegate));
22 } 22 }
23 return pairing_registry; 23 return pairing_registry;
24 } 24 }
25 25
26 } // namespace remoting 26 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/pairing_registry_delegate.h ('k') | remoting/host/pairing_registry_delegate_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698