Change DtmfSenderHandler to handle events on the signaling thread.
[chromium-blink-merge.git] / extensions / test / test_service_registration_manager.cc
blobb70457337ddf370a1dcf907e3e2da8a85feb5691
1 // Copyright 2014 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.
5 #include "extensions/test/test_service_registration_manager.h"
7 namespace extensions {
9 TestServiceRegistrationManager::TestServiceRegistrationManager() {
10 ServiceRegistrationManager::SetServiceRegistrationManagerForTest(this);
13 TestServiceRegistrationManager::~TestServiceRegistrationManager() {
14 ServiceRegistrationManager::SetServiceRegistrationManagerForTest(nullptr);
17 void TestServiceRegistrationManager::AddServiceToServiceRegistry(
18 content::ServiceRegistry* service_registry,
19 internal::ServiceFactoryBase* factory) {
20 auto test_factory = test_factories_.find(factory->GetName());
21 if (test_factory != test_factories_.end()) {
22 test_factory->second->Register(service_registry);
23 } else {
24 ServiceRegistrationManager::AddServiceToServiceRegistry(service_registry,
25 factory);
29 } // namespace extensions