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

Unified Diff: chrome/browser/services/gcm/gcm_utils.cc

Issue 301973009: Add browser-global GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build on Android. Created 6 years, 6 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/browser/services/gcm/gcm_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/gcm_utils.cc
diff --git a/chrome/browser/services/gcm/gcm_utils.cc b/chrome/browser/services/gcm/gcm_utils.cc
deleted file mode 100644
index 803e210e277f2c4517445ec05ee0d90bf0b89e89..0000000000000000000000000000000000000000
--- a/chrome/browser/services/gcm/gcm_utils.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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/browser/services/gcm/gcm_utils.h"
-
-#include "base/logging.h"
-#include "chrome/common/chrome_version_info.h"
-
-namespace gcm {
-
-namespace {
-
-GCMClient::ChromePlatform GetPlatform() {
-#if defined(OS_WIN)
- return GCMClient::PLATFORM_WIN;
-#elif defined(OS_MACOSX)
- return GCMClient::PLATFORM_MAC;
-#elif defined(OS_IOS)
- return GCMClient::PLATFORM_IOS;
-#elif defined(OS_ANDROID)
- return GCMClient::PLATFORM_ANDROID;
-#elif defined(OS_CHROMEOS)
- return GCMClient::PLATFORM_CROS;
-#elif defined(OS_LINUX)
- return GCMClient::PLATFORM_LINUX;
-#else
- // For all other platforms, return as LINUX.
- return GCMClient::PLATFORM_LINUX;
-#endif
-}
-
-GCMClient::ChromeChannel GetChannel() {
- chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
- switch (channel) {
- case chrome::VersionInfo::CHANNEL_UNKNOWN:
- return GCMClient::CHANNEL_UNKNOWN;
- case chrome::VersionInfo::CHANNEL_CANARY:
- return GCMClient::CHANNEL_CANARY;
- case chrome::VersionInfo::CHANNEL_DEV:
- return GCMClient::CHANNEL_DEV;
- case chrome::VersionInfo::CHANNEL_BETA:
- return GCMClient::CHANNEL_BETA;
- case chrome::VersionInfo::CHANNEL_STABLE:
- return GCMClient::CHANNEL_STABLE;
- default:
- NOTREACHED();
- return GCMClient::CHANNEL_UNKNOWN;
- }
-}
-
-std::string GetVersion() {
- chrome::VersionInfo version_info;
- return version_info.Version();
-}
-
-} // namespace
-
-GCMClient::ChromeBuildInfo GetChromeBuildInfo() {
- GCMClient::ChromeBuildInfo chrome_build_info;
- chrome_build_info.platform = GetPlatform();
- chrome_build_info.channel = GetChannel();
- chrome_build_info.version = GetVersion();
- return chrome_build_info;
-}
-
-} // namespace gcm
« no previous file with comments | « chrome/browser/services/gcm/gcm_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698