Commit f7542b65 authored by Paul Miller's avatar Paul Miller Committed by Commit Bot

Rename android_webview::GetChannel

Commit 0c0fc42d moved
AwVariationsServiceClient's "channel == unknown ? stable : channel"
logic into a new android_webview::GetChannel. But this is confusing
because the new GetChannel retains the variations-specific comment, and
the name "android_webview::GetChannel" might sound like all of WebView
should be using this sanitized channel, when UMA still needs the
un-sanitized channel.

Move the variations-specific comment back into AwVariationsServiceClient
and rename GetChannel to GetChannelOrStable.

BUG=758290

Change-Id: I4590aa22b73424e14e47444c3fdf3abc151bf441
Reviewed-on: https://chromium-review.googlesource.com/1187271Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Paul Miller <paulmiller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585662}
parent abae2fe8
......@@ -48,7 +48,10 @@ AwVariationsServiceClient::GetNetworkTimeTracker() {
}
Channel AwVariationsServiceClient::GetChannel() {
return android_webview::GetChannel();
// Pretend stand-alone WebView is always "stable" for the purpose of
// variations. This simplifies experiment design, since stand-alone WebView
// need not be considered separately when choosing channels.
return android_webview::GetChannelOrStable();
}
bool AwVariationsServiceClient::GetSupportsPermanentConsistency() {
......
......@@ -10,13 +10,8 @@ namespace android_webview {
using version_info::Channel;
Channel GetChannel() {
Channel GetChannelOrStable() {
Channel channel = version_info::GetChannel();
// There are separate Monochrome APKs built for each channel, but only one
// stand-alone WebView APK for all channels, so stand-alone WebView has
// channel "unknown". Pretend stand-alone WebView is always "stable" for the
// purpose of variations. This simplifies experiment design, since stand-alone
// WebView need not be considered separately when choosing channels.
return channel == Channel::UNKNOWN ? Channel::STABLE : channel;
}
......
......@@ -9,7 +9,10 @@
namespace android_webview {
version_info::Channel GetChannel();
// There are separate Monochrome APKs built for each channel, but only one
// stand-alone WebView APK for all channels, so stand-alone WebView has channel
// "unknown". Return the channel if it's known, or "stable" if it's "unknown".
version_info::Channel GetChannelOrStable();
} // namespace android_webview
......
......@@ -73,7 +73,8 @@ class AwCrashReporterClient : public ::crash_reporter::CrashReporterClient {
std::string* channel) override {
*product_name = "AndroidWebView";
*version = PRODUCT_VERSION;
*channel = version_info::GetChannelString(android_webview::GetChannel());
*channel =
version_info::GetChannelString(android_webview::GetChannelOrStable());
}
// Microdumps are always enabled in WebView builds, conversely to what happens
// in the case of the other Chrome for Android builds (where they are enabled
......
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