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

Unified Diff: chrome/common/chrome_version_info_mac.mm

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_chromeos.cc ('k') | chrome/common/chrome_version_info_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_version_info_mac.mm
diff --git a/chrome/common/chrome_version_info_mac.mm b/chrome/common/chrome_version_info_mac.mm
deleted file mode 100644
index f5ceea3e1a46993a1dea5ab0d1b36decaac982dc..0000000000000000000000000000000000000000
--- a/chrome/common/chrome_version_info_mac.mm
+++ /dev/null
@@ -1,63 +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"
-
-#import <Foundation/Foundation.h>
-
-#include "base/basictypes.h"
-#include "base/mac/bundle_locations.h"
-#include "base/strings/sys_string_conversions.h"
-
-namespace chrome {
-
-// static
-std::string VersionInfo::GetVersionStringModifier() {
-#if defined(GOOGLE_CHROME_BUILD)
- // Use the main Chrome application bundle and not the framework bundle.
- // Keystone keys don't live in the framework.
- NSBundle* bundle = base::mac::OuterBundle();
- NSString* channel = [bundle objectForInfoDictionaryKey:@"KSChannelID"];
-
- // Only ever return "", "unknown", "beta", "dev", or "canary" in a branded
- // build.
- if (![bundle objectForInfoDictionaryKey:@"KSProductID"]) {
- // This build is not Keystone-enabled, it can't have a channel.
- channel = @"unknown";
- } else if (!channel) {
- // For the stable channel, KSChannelID is not set.
- channel = @"";
- } else if ([channel isEqual:@"beta"] ||
- [channel isEqual:@"dev"] ||
- [channel isEqual:@"canary"]) {
- // do nothing.
- } else {
- channel = @"unknown";
- }
-
- return base::SysNSStringToUTF8(channel);
-#else
- return std::string();
-#endif
-}
-
-// static
-version_info::Channel VersionInfo::GetChannel() {
-#if defined(GOOGLE_CHROME_BUILD)
- std::string channel = GetVersionStringModifier();
- if (channel.empty()) {
- return version_info::Channel::STABLE;
- } else if (channel == "beta") {
- return version_info::Channel::BETA;
- } else if (channel == "dev") {
- return version_info::Channel::DEV;
- } else if (channel == "canary") {
- return version_info::Channel::CANARY;
- }
-#endif
-
- return version_info::Channel::UNKNOWN;
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/common/chrome_version_info_chromeos.cc ('k') | chrome/common/chrome_version_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698