Commit 261617fb authored by Kyle Williams's avatar Kyle Williams Committed by Commit Bot

chromebox_for_meetings: Add ERPTelemetryService Feature Trial Parameter

Create a feature trial parameter to support enabling telemetry through
encrypted reporting pipeline on cfm specific devices.

Create helper function to easily query CfmMojoServices feature flag.

BUG=chromium:1105567,b:137780359
TEST='Ensure feature parameter is enabled through command line'

Change-Id: I607a1d153811d6847b1fed5429c4146387853c64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2506264
Commit-Queue: Kyle Williams <kdgwill@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822656}
parent bf2ed779
...@@ -12,9 +12,7 @@ namespace chromeos { ...@@ -12,9 +12,7 @@ namespace chromeos {
namespace cfm { namespace cfm {
void InitializeCfmServices() { void InitializeCfmServices() {
if (!base::FeatureList::IsEnabled( if (!features::IsCfmMojoEnabled() || !CfmHotlineClient::Get()) {
chromeos::cfm::features::kCfmMojoServices) ||
!CfmHotlineClient::Get()) {
return; return;
} }
......
...@@ -128,7 +128,7 @@ void PopulateChromeFrameBindersForExtension( ...@@ -128,7 +128,7 @@ void PopulateChromeFrameBindersForExtension(
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#if BUILDFLAG(PLATFORM_CFM) #if BUILDFLAG(PLATFORM_CFM)
if (base::FeatureList::IsEnabled(chromeos::cfm::features::kCfmMojoServices) && if (chromeos::cfm::features::IsCfmMojoEnabled() &&
chromeos::cfm::IsChromeboxForMeetingsAppId(extension->id())) { chromeos::cfm::IsChromeboxForMeetingsAppId(extension->id())) {
binder_map->Add<chromeos::cfm::mojom::CfmServiceContext>( binder_map->Add<chromeos::cfm::mojom::CfmServiceContext>(
base::BindRepeating( base::BindRepeating(
......
# Features # Chromebox for Meetings Features
Note: Feature Flags are run time flags Note: Feature Flags are run time flags
## CfmMojoServices ## CfmMojoServices (Feature)
```bash ```bash
$ ssh <cfm-dut> $ ssh <cfm-dut>
...@@ -10,5 +10,15 @@ $ echo "--enable-features=CfmMojoServices" >> /etc/chrome_dev.conf ...@@ -10,5 +10,15 @@ $ echo "--enable-features=CfmMojoServices" >> /etc/chrome_dev.conf
$ reboot ui $ reboot ui
``` ```
This Feature flag is controlled by a server-side experiment that enables This feature flag is controlled by a server-side experiment that enables
Chromium to interact with mojom based Chromebox for Meetings services. Chromium to interact with mojom based Chromebox for Meetings services.
### ERPTelemetryService (Feature Param)
```bash
$ ssh <cfm-dut>
$ echo "--enable-features=CfmMojoServices:ERPTelemetryService/true" >> /etc/chrome_dev.conf
$ reboot ui
```
This feature parameter enables the use of the encrypted reporting service api for cloud logging and telemetry on the Chromebox for Meetings platforms. It is dependent on the `CfmMojoService` feature flag being enabled.
...@@ -13,6 +13,20 @@ namespace features { ...@@ -13,6 +13,20 @@ namespace features {
const base::Feature kCfmMojoServices{"CfmMojoServices", const base::Feature kCfmMojoServices{"CfmMojoServices",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Enables or disables the ability to enqueue cloud telemetry information using
// Chrome Encrypted Reporting Pipeline API.
const base::FeatureParam<bool> kCfmTelemetryParam{&kCfmMojoServices,
"ERPTelemetryService", false};
bool IsCfmMojoEnabled() {
return base::FeatureList::IsEnabled(
chromeos::cfm::features::kCfmMojoServices);
}
bool IsCfmTelemetryEnabled() {
return kCfmTelemetryParam.Get();
}
} // namespace features } // namespace features
} // namespace cfm } // namespace cfm
} // namespace chromeos } // namespace chromeos
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef CHROMEOS_COMPONENTS_CHROMEBOX_FOR_MEETINGS_FEATURES_FEATURES_H_ #ifndef CHROMEOS_COMPONENTS_CHROMEBOX_FOR_MEETINGS_FEATURES_FEATURES_H_
#define CHROMEOS_COMPONENTS_CHROMEBOX_FOR_MEETINGS_FEATURES_FEATURES_H_ #define CHROMEOS_COMPONENTS_CHROMEBOX_FOR_MEETINGS_FEATURES_FEATURES_H_
#include <string>
#include "base/component_export.h" #include "base/component_export.h"
#include "base/feature_list.h" #include "base/feature_list.h"
...@@ -15,6 +17,15 @@ namespace features { ...@@ -15,6 +17,15 @@ namespace features {
COMPONENT_EXPORT(CFM_FEATURES) COMPONENT_EXPORT(CFM_FEATURES)
extern const base::Feature kCfmMojoServices; extern const base::Feature kCfmMojoServices;
COMPONENT_EXPORT(CFM_FEATURES)
extern const base::FeatureParam<bool> kCfmTelemetryParam;
// Whether cross platform mojo connections is enabled.
bool IsCfmMojoEnabled();
// Whether Telemetry through Encrypted Reporting Pipeline is enabled.
bool IsCfmTelemetryEnabled();
} // namespace features } // namespace features
} // namespace cfm } // namespace cfm
} // namespace chromeos } // namespace chromeos
......
...@@ -132,7 +132,7 @@ CfmHotlineClient::~CfmHotlineClient() { ...@@ -132,7 +132,7 @@ CfmHotlineClient::~CfmHotlineClient() {
// static // static
void CfmHotlineClient::Initialize(dbus::Bus* bus) { void CfmHotlineClient::Initialize(dbus::Bus* bus) {
DCHECK(bus); DCHECK(bus);
if (base::FeatureList::IsEnabled(chromeos::cfm::features::kCfmMojoServices)) { if (chromeos::cfm::features::IsCfmMojoEnabled()) {
(new CfmHotlineClientImpl())->Init(bus); (new CfmHotlineClientImpl())->Init(bus);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment