Rename android_webview::GetChannel
Commit 0c0fc42d9f
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/1187271
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Paul Miller <paulmiller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585662}
This commit is contained in:
android_webview
browser
common
@ -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
|
||||
|
Reference in New Issue
Block a user