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

Unified Diff: components/version_info/channel_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 | « components/version_info/channel_android.h ('k') | components/version_info/version_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/version_info/channel_android.cc
diff --git a/components/version_info/channel_android.cc b/components/version_info/channel_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b63b5ac924cf188f859c8285064138ebb21ecd6b
--- /dev/null
+++ b/components/version_info/channel_android.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/version_info/channel_android.h"
+
+#include <cstring>
+
+namespace version_info {
+
+Channel ChannelFromPackageName(const char* package_name) {
+ if (!strcmp(package_name, "com.android.chrome") ||
+ !strcmp(package_name, "com.chrome.work"))
+ return Channel::STABLE;
+ if (!strcmp(package_name, "com.chrome.beta"))
+ return Channel::BETA;
+ if (!strcmp(package_name, "com.chrome.dev"))
+ return Channel::DEV;
+ if (!strcmp(package_name, "com.chrome.canary"))
+ return Channel::CANARY;
+
+ return Channel::UNKNOWN;
+}
+
+} // namespace version_info
« no previous file with comments | « components/version_info/channel_android.h ('k') | components/version_info/version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698