[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / fuchsia_component_support / inspect.cc
1 // Copyright 2020 The Chromium Authors
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 "components/fuchsia_component_support/inspect.h"
6
7 #include <lib/sys/inspect/cpp/component.h>
8
9 #include "components/version_info/version_info.h"
10
11 namespace fuchsia_component_support {
12
13 namespace {
14 const char kVersion[] = "version";
15 const char kLastChange[] = "last_change_revision";
16 }  // namespace
17
18 void PublishVersionInfoToInspect(sys::ComponentInspector* inspector) {
19   // These values are managed by the inspector, since they won't be updated over
20   // the lifetime of the component.
21   // TODO(https://crbug.com/1077428): Add release channel.
22   inspector->root().CreateString(
23       kVersion, std::string(version_info::GetVersionNumber()), inspector);
24   inspector->root().CreateString(
25       kLastChange, std::string(version_info::GetLastChange()), inspector);
26 }
27
28 }  // namespace fuchsia_component_support