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

Unified Diff: chrome/common/channel_info_android.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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') | chrome/common/channel_info_chromeos.cc » ('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/chrome_version_info_android.cc b/chrome/common/channel_info_android.cc
similarity index 81%
rename from chrome/common/chrome_version_info_android.cc
rename to chrome/common/channel_info_android.cc
index bf30a6af90eaa402eec96d5fa3837f4b128a1613..11d64ed126ca726efcf7b1387cb5ee45cb0abb35 100644
--- a/chrome/common/chrome_version_info_android.cc
+++ b/chrome/common/channel_info_android.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/channel_info.h"
#include "base/android/build_info.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "components/version_info/version_info.h"
namespace chrome {
-// static
-std::string VersionInfo::GetVersionStringModifier() {
+std::string GetChannelString() {
switch (GetChannel()) {
case version_info::Channel::UNKNOWN: return "unknown";
case version_info::Channel::CANARY: return "canary";
@@ -23,13 +23,12 @@ std::string VersionInfo::GetVersionStringModifier() {
return std::string();
}
-// static
-version_info::Channel VersionInfo::GetChannel() {
+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"))
+ 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;
« no previous file with comments | « chrome/common/channel_info.cc ('k') | chrome/common/channel_info_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698