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

Side by Side Diff: services/service_manager/public/cpp/bind_source_info_struct_traits.h

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
(Empty)
1 // Copyright 2017 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 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_BIND_SOURCE_INFO_STRUCT_TRAITS_H_
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_BIND_SOURCE_INFO_STRUCT_TRAITS_H_
7
8 #include "services/service_manager/public/cpp/bind_source_info.h"
9 #include "services/service_manager/public/interfaces/service.mojom.h"
10
11 namespace mojo {
12
13 template <>
14 struct StructTraits<service_manager::mojom::BindSourceInfo::DataView,
15 service_manager::BindSourceInfo> {
16 static const service_manager::Identity& identity(
17 const service_manager::BindSourceInfo& source) {
18 return source.identity;
19 }
20 static const service_manager::CapabilitySet& required_capabilities(
21 const service_manager::BindSourceInfo& source) {
22 return source.required_capabilities;
23 }
24 static bool Read(service_manager::mojom::BindSourceInfoDataView data,
25 service_manager::BindSourceInfo* out) {
26 return data.ReadIdentity(&out->identity) &&
27 data.ReadRequiredCapabilities(&out->required_capabilities);
28 }
29 };
30
31 } // namespace mojo
32
33 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_BIND_SOURCE_INFO_STRUCT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698