Report Metrics based off of Build Type for Fuchsia
Report metrics based off of Built Type instead of channel for Fuchsia metrics Bug: 141130864 Change-Id: I8687514babd14fb5d8cec7289aafa72121bbc0a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809674 Reviewed-by: Yuchen Liu <yucliu@chromium.org> Commit-Queue: Haines Sy <hainesy@google.com> Cr-Commit-Position: refs/heads/master@{#697440}
This commit is contained in:
@@ -49,7 +49,9 @@ const char kMetricsOldClientID[] = "user_experience_metrics.client_id";
|
|||||||
|
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
const char kClientIdName[] = "Client ID";
|
const char kClientIdName[] = "Client ID";
|
||||||
#else
|
#endif // defined(OS_ANDROID)
|
||||||
|
|
||||||
|
#if !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
||||||
|
|
||||||
const struct ChannelMap {
|
const struct ChannelMap {
|
||||||
const char* chromecast_channel;
|
const char* chromecast_channel;
|
||||||
@@ -76,7 +78,7 @@ const struct ChannelMap {
|
|||||||
// Any non-empty channel name is considered beta channel
|
// Any non-empty channel name is considered beta channel
|
||||||
return ::metrics::SystemProfileProto::CHANNEL_BETA;
|
return ::metrics::SystemProfileProto::CHANNEL_BETA;
|
||||||
}
|
}
|
||||||
#endif // !defined(OS_ANDROID)
|
#endif // !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@@ -157,7 +159,7 @@ bool CastMetricsServiceClient::GetBrand(std::string* brand_code) {
|
|||||||
::metrics::SystemProfileProto::Channel CastMetricsServiceClient::GetChannel() {
|
::metrics::SystemProfileProto::Channel CastMetricsServiceClient::GetChannel() {
|
||||||
std::unique_ptr<CastSysInfo> sys_info = CreateSysInfo();
|
std::unique_ptr<CastSysInfo> sys_info = CreateSysInfo();
|
||||||
|
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID) || defined(OS_FUCHSIA)
|
||||||
switch (sys_info->GetBuildType()) {
|
switch (sys_info->GetBuildType()) {
|
||||||
case CastSysInfo::BUILD_ENG:
|
case CastSysInfo::BUILD_ENG:
|
||||||
return ::metrics::SystemProfileProto::CHANNEL_UNKNOWN;
|
return ::metrics::SystemProfileProto::CHANNEL_UNKNOWN;
|
||||||
@@ -174,7 +176,7 @@ bool CastMetricsServiceClient::GetBrand(std::string* brand_code) {
|
|||||||
// arbitrary.
|
// arbitrary.
|
||||||
return GetReleaseChannelFromUpdateChannelName(
|
return GetReleaseChannelFromUpdateChannelName(
|
||||||
sys_info->GetSystemReleaseChannel());
|
sys_info->GetSystemReleaseChannel());
|
||||||
#endif // defined(OS_ANDROID)
|
#endif // defined(OS_ANDROID) || defined(OS_FUCHSIA)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CastMetricsServiceClient::GetVersionString() {
|
std::string CastMetricsServiceClient::GetVersionString() {
|
||||||
|
Reference in New Issue
Block a user