Index: chrome/browser/metrics/chrome_metrics_service_client.cc |
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc |
index 6aa71c8233d83c39f11217f8f3cbf356cb27f17d..c3f0abdccf96a048539d40aef7a73cd8c055abf0 100644 |
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc |
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc |
@@ -28,8 +28,8 @@ |
#include "chrome/browser/ui/browser_otr_state.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_switches.h" |
-#include "chrome/common/chrome_version_info.h" |
#include "chrome/common/crash_keys.h" |
+#include "chrome/common/metrics/version_utils.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/render_messages.h" |
#include "components/metrics/gpu/gpu_metrics_provider.h" |
@@ -82,24 +82,6 @@ namespace { |
// data. |
const int kMaxHistogramGatheringWaitDuration = 60000; // 60 seconds. |
-metrics::SystemProfileProto::Channel AsProtobufChannel( |
- chrome::VersionInfo::Channel channel) { |
- switch (channel) { |
- case chrome::VersionInfo::CHANNEL_UNKNOWN: |
- return metrics::SystemProfileProto::CHANNEL_UNKNOWN; |
- case chrome::VersionInfo::CHANNEL_CANARY: |
- return metrics::SystemProfileProto::CHANNEL_CANARY; |
- case chrome::VersionInfo::CHANNEL_DEV: |
- return metrics::SystemProfileProto::CHANNEL_DEV; |
- case chrome::VersionInfo::CHANNEL_BETA: |
- return metrics::SystemProfileProto::CHANNEL_BETA; |
- case chrome::VersionInfo::CHANNEL_STABLE: |
- return metrics::SystemProfileProto::CHANNEL_STABLE; |
- } |
- NOTREACHED(); |
- return metrics::SystemProfileProto::CHANNEL_UNKNOWN; |
-} |
- |
// Standard interval between log uploads, in seconds. |
#if defined(OS_ANDROID) || defined(OS_IOS) |
const int kStandardUploadIntervalSeconds = 5 * 60; // Five minutes. |
@@ -200,18 +182,11 @@ bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { |
} |
metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { |
- return AsProtobufChannel(chrome::VersionInfo::GetChannel()); |
+ return metrics::AsProtobufChannel(chrome::VersionInfo::GetChannel()); |
} |
std::string ChromeMetricsServiceClient::GetVersionString() { |
- chrome::VersionInfo version_info; |
- std::string version = version_info.Version(); |
-#if defined(ARCH_CPU_64_BITS) |
- version += "-64"; |
-#endif // defined(ARCH_CPU_64_BITS) |
- if (!version_info.IsOfficialBuild()) |
- version.append("-devel"); |
- return version; |
+ return metrics::GetVersionString(); |
} |
void ChromeMetricsServiceClient::OnLogUploadComplete() { |