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

Unified Diff: chrome/common/chrome_version_info_posix.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_mac.mm ('k') | chrome/common/chrome_version_info_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_version_info_posix.cc
diff --git a/chrome/common/chrome_version_info_posix.cc b/chrome/common/chrome_version_info_posix.cc
deleted file mode 100644
index c39e6514d016ae6f7085a1acc4a95d3abc6d7d90..0000000000000000000000000000000000000000
--- a/chrome/common/chrome_version_info_posix.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 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/strings/string_util.h"
-#include "build/build_config.h"
-
-namespace chrome {
-
-namespace {
-
-// Helper function to return both the channel enum and modifier string.
-// Implements both together to prevent their behavior from diverging, which has
-// happened multiple times in the past.
-version_info::Channel GetChannelImpl(std::string* modifier_out) {
- version_info::Channel channel = version_info::Channel::UNKNOWN;
- std::string modifier;
-
- char* env = getenv("CHROME_VERSION_EXTRA");
- if (env)
- modifier = env;
-
-#if defined(GOOGLE_CHROME_BUILD)
- // Only ever return "", "unknown", "dev" or "beta" in a branded build.
- if (modifier == "unstable") // linux version of "dev"
- modifier = "dev";
- if (modifier == "stable") {
- channel = version_info::Channel::STABLE;
- modifier = "";
- } else if (modifier == "dev") {
- channel = version_info::Channel::DEV;
- } else if (modifier == "beta") {
- channel = version_info::Channel::BETA;
- } else {
- modifier = "unknown";
- }
-#endif
-
- if (modifier_out)
- modifier_out->swap(modifier);
-
- return channel;
-}
-
-} // namespace
-
-// static
-std::string VersionInfo::GetVersionStringModifier() {
- std::string modifier;
- GetChannelImpl(&modifier);
- return modifier;
-}
-
-// static
-version_info::Channel VersionInfo::GetChannel() {
- return GetChannelImpl(NULL);
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/common/chrome_version_info_mac.mm ('k') | chrome/common/chrome_version_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698