Commit ecbd53c5 authored by David Lei's avatar David Lei Committed by Commit Bot

CrOS Media App: Add isDevChannel to window.features.

Feeds in isDevChannel to window.features via loadTimeData. This allows
us to determine if the SWA is running in a DEV channel.

Bug: b/159267911
Change-Id: Id4dcbb8be14fc726cf995d9accba07658f55ef88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531336
Commit-Queue: David Lei <dlei@google.com>
Reviewed-by: default avatarDavid Lei <dlei@google.com>
Reviewed-by: default avatarPatti <patricialor@chromium.org>
Auto-Submit: David Lei <dlei@google.com>
Cr-Commit-Position: refs/heads/master@{#826597}
parent 0a536860
......@@ -47,4 +47,5 @@ void ChromeMediaAppUIDelegate::PopulateLoadTimeData(
version_info::Channel channel = chrome::GetChannel();
source->AddBoolean("flagsMenu", channel != version_info::Channel::BETA &&
channel != version_info::Channel::STABLE);
source->AddBoolean("isDevChannel", channel == version_info::Channel::DEV);
}
......@@ -318,6 +318,7 @@ window.addEventListener('DOMContentLoaded', () => {
/** @type{{features: Object<string, boolean>}} */ (window).features = {
imageAnnotation: loadTimeData.getBoolean('imageAnnotation'),
flagsMenu: loadTimeData.getBoolean('flagsMenu'),
isDevChannel: loadTimeData.getBoolean('isDevChannel'),
};
const app = getApp();
......
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