pairing_registry_delegate.cc 764 B

1234567891011121314151617181920212223242526
  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. #include "remoting/host/pairing_registry_delegate.h"
  5. #include <utility>
  6. #include "base/task/single_thread_task_runner.h"
  7. namespace remoting {
  8. using protocol::PairingRegistry;
  9. scoped_refptr<PairingRegistry> CreatePairingRegistry(
  10. scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
  11. scoped_refptr<PairingRegistry> pairing_registry;
  12. std::unique_ptr<PairingRegistry::Delegate> delegate(
  13. CreatePairingRegistryDelegate());
  14. if (delegate) {
  15. pairing_registry = new PairingRegistry(task_runner, std::move(delegate));
  16. }
  17. return pairing_registry;
  18. }
  19. } // namespace remoting