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

Side by Side Diff: chromeos/dbus/services/cros_dbus_service.cc

Issue 2798703002: Create org.chromium.KioskAppService. (Closed)
Patch Set: style nits Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/dbus/services/cros_dbus_service.h" 5 #include "chromeos/dbus/services/cros_dbus_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const dbus::ObjectPath& object_path, 106 const dbus::ObjectPath& object_path,
107 ServiceProviderList service_providers) { 107 ServiceProviderList service_providers) {
108 if (DBusThreadManager::Get()->IsUsingFakes()) 108 if (DBusThreadManager::Get()->IsUsingFakes())
109 return base::MakeUnique<CrosDBusServiceStubImpl>(); 109 return base::MakeUnique<CrosDBusServiceStubImpl>();
110 110
111 return CreateRealImpl(DBusThreadManager::Get()->GetSystemBus(), service_name, 111 return CreateRealImpl(DBusThreadManager::Get()->GetSystemBus(), service_name,
112 object_path, std::move(service_providers)); 112 object_path, std::move(service_providers));
113 } 113 }
114 114
115 // static 115 // static
116 CrosDBusService::ServiceProviderList CrosDBusService::CreateServiceProviderList(
117 std::unique_ptr<ServiceProviderInterface> provider) {
118 ServiceProviderList list;
119 list.push_back(std::move(provider));
120 return list;
121 }
122
123 // static
116 std::unique_ptr<CrosDBusService> CrosDBusService::CreateRealImpl( 124 std::unique_ptr<CrosDBusService> CrosDBusService::CreateRealImpl(
117 dbus::Bus* bus, 125 dbus::Bus* bus,
118 const std::string& service_name, 126 const std::string& service_name,
119 const dbus::ObjectPath& object_path, 127 const dbus::ObjectPath& object_path,
120 ServiceProviderList service_providers) { 128 ServiceProviderList service_providers) {
121 auto service = base::MakeUnique<CrosDBusServiceImpl>( 129 auto service = base::MakeUnique<CrosDBusServiceImpl>(
122 bus, service_name, object_path, std::move(service_providers)); 130 bus, service_name, object_path, std::move(service_providers));
123 service->Start(); 131 service->Start();
124 return std::move(service); 132 return std::move(service);
125 } 133 }
126 134
127 CrosDBusService::~CrosDBusService() = default; 135 CrosDBusService::~CrosDBusService() = default;
128 136
129 CrosDBusService::CrosDBusService() = default; 137 CrosDBusService::CrosDBusService() = default;
130 138
131 CrosDBusService::ServiceProviderInterface::~ServiceProviderInterface() = 139 CrosDBusService::ServiceProviderInterface::~ServiceProviderInterface() =
132 default; 140 default;
133 141
134 } // namespace chromeos 142 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/services/cros_dbus_service.h ('k') | chromeos/dbus/services/org.chromium.KioskAppService.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698