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
3// found in the LICENSE file.
4
5#include "remoting/host/pairing_registry_delegate.h"
6
7#include "base/single_thread_task_runner.h"
8
9namespace remoting {
10
11using protocol::PairingRegistry;
12
13scoped_refptr<PairingRegistry> CreatePairingRegistry(
14    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
15  scoped_refptr<PairingRegistry> pairing_registry;
16  scoped_ptr<PairingRegistry::Delegate> delegate(
17      CreatePairingRegistryDelegate());
18  if (delegate) {
19    pairing_registry = new PairingRegistry(task_runner, delegate.Pass());
20  }
21  return pairing_registry;
22}
23
24}  // namespace remoting
25