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

Side by Side Diff: extensions/test/test_service_registration_manager.cc

Issue 652313002: Enable the mojo-based serial API in the renderer behind a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-js-natives-registration
Patch Set: fix windows build Created 6 years, 1 month 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
« no previous file with comments | « extensions/test/test_service_registration_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "extensions/test/test_service_registration_manager.h"
6
7 namespace extensions {
8
9 TestServiceRegistrationManager::TestServiceRegistrationManager() {
10 ServiceRegistrationManager::SetServiceRegistrationManagerForTest(this);
11 }
12
13 TestServiceRegistrationManager::~TestServiceRegistrationManager() {
14 ServiceRegistrationManager::SetServiceRegistrationManagerForTest(nullptr);
15 }
16
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);
26 }
27 }
28
29 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/test/test_service_registration_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698