Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: chrome/common/channel_info_android.cc

Issue 2879703002: WebView: Add channel info for UMA (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/channel_info.cc ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/channel_info_android.cc
diff --git a/chrome/common/channel_info_android.cc b/chrome/common/channel_info_android.cc
index 11d64ed126ca726efcf7b1387cb5ee45cb0abb35..3791b6e9a0d099cd0078fe1b75db3179557680c4 100644
--- a/chrome/common/channel_info_android.cc
+++ b/chrome/common/channel_info_android.cc
@@ -7,6 +7,7 @@
#include "base/android/build_info.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "components/version_info/channel_android.h"
#include "components/version_info/version_info.h"
namespace chrome {
@@ -26,18 +27,7 @@ std::string GetChannelString() {
version_info::Channel GetChannel() {
const base::android::BuildInfo* bi = base::android::BuildInfo::GetInstance();
DCHECK(bi && bi->package_name());
-
- if (!strcmp(bi->package_name(), "com.android.chrome") ||
- !strcmp(bi->package_name(), "com.chrome.work"))
- return version_info::Channel::STABLE;
- if (!strcmp(bi->package_name(), "com.chrome.beta"))
- return version_info::Channel::BETA;
- if (!strcmp(bi->package_name(), "com.chrome.dev"))
- return version_info::Channel::DEV;
- if (!strcmp(bi->package_name(), "com.chrome.canary"))
- return version_info::Channel::CANARY;
-
- return version_info::Channel::UNKNOWN;
+ return version_info::ChannelFromPackageName(bi->package_name());
}
} // namespace chrome
« no previous file with comments | « chrome/common/channel_info.cc ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698