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

Unified Diff: chrome/common/chrome_version_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/chrome_version_info.cc ('k') | chrome/common/chrome_version_info_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_version_info_android.cc
diff --git a/chrome/common/chrome_version_info_android.cc b/chrome/common/chrome_version_info_android.cc
deleted file mode 100644
index bf30a6af90eaa402eec96d5fa3837f4b128a1613..0000000000000000000000000000000000000000
--- a/chrome/common/chrome_version_info_android.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2012 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 "chrome/common/chrome_version_info.h"
-
-#include "base/android/build_info.h"
-#include "base/logging.h"
-#include "base/strings/string_util.h"
-
-namespace chrome {
-
-// static
-std::string VersionInfo::GetVersionStringModifier() {
- switch (GetChannel()) {
- case version_info::Channel::UNKNOWN: return "unknown";
- case version_info::Channel::CANARY: return "canary";
- case version_info::Channel::DEV: return "dev";
- case version_info::Channel::BETA: return "beta";
- case version_info::Channel::STABLE: return std::string();
- }
- NOTREACHED() << "Unknown channel " << static_cast<int>(GetChannel());
- return std::string();
-}
-
-// static
-version_info::Channel VersionInfo::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;
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/common/chrome_version_info.cc ('k') | chrome/common/chrome_version_info_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698