| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/google/google_util.h" | 9 #include "chrome/browser/google/google_util.h" |
| 10 #include "chrome/browser/ui/browser_otr_state.h" | 10 #include "chrome/browser/ui/browser_otr_state.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 return metrics::SystemProfileProto::CHANNEL_BETA; | 26 return metrics::SystemProfileProto::CHANNEL_BETA; |
| 27 case chrome::VersionInfo::CHANNEL_STABLE: | 27 case chrome::VersionInfo::CHANNEL_STABLE: |
| 28 return metrics::SystemProfileProto::CHANNEL_STABLE; | 28 return metrics::SystemProfileProto::CHANNEL_STABLE; |
| 29 } | 29 } |
| 30 NOTREACHED(); | 30 NOTREACHED(); |
| 31 return metrics::SystemProfileProto::CHANNEL_UNKNOWN; | 31 return metrics::SystemProfileProto::CHANNEL_UNKNOWN; |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 ChromeMetricsServiceClient::ChromeMetricsServiceClient() | 36 ChromeMetricsServiceClient::ChromeMetricsServiceClient() { |
| 37 : MetricsServiceClient() { | |
| 38 } | 37 } |
| 39 | 38 |
| 40 ChromeMetricsServiceClient::~ChromeMetricsServiceClient() { | 39 ChromeMetricsServiceClient::~ChromeMetricsServiceClient() { |
| 41 } | 40 } |
| 42 | 41 |
| 43 void ChromeMetricsServiceClient::SetClientID(const std::string& client_id) { | 42 void ChromeMetricsServiceClient::SetClientID(const std::string& client_id) { |
| 44 crash_keys::SetClientID(client_id); | 43 crash_keys::SetClientID(client_id); |
| 45 } | 44 } |
| 46 | 45 |
| 47 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 46 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
| 48 return !chrome::IsOffTheRecordSessionActive(); | 47 return !chrome::IsOffTheRecordSessionActive(); |
| 49 } | 48 } |
| 50 | 49 |
| 51 std::string ChromeMetricsServiceClient::GetApplicationLocale() { | 50 std::string ChromeMetricsServiceClient::GetApplicationLocale() { |
| 52 return g_browser_process->GetApplicationLocale(); | 51 return g_browser_process->GetApplicationLocale(); |
| 53 } | 52 } |
| 54 | 53 |
| 55 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { | 54 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { |
| 56 return google_util::GetBrand(brand_code); | 55 return google_util::GetBrand(brand_code); |
| 57 } | 56 } |
| 58 | 57 |
| 59 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { | 58 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { |
| 60 return AsProtobufChannel(chrome::VersionInfo::GetChannel()); | 59 return AsProtobufChannel(chrome::VersionInfo::GetChannel()); |
| 61 } | 60 } |
| 62 | 61 |
| 63 std::string ChromeMetricsServiceClient::GetVersionString() { | 62 std::string ChromeMetricsServiceClient::GetVersionString() { |
| 64 // TODO(asvitkine): Move over from metrics_log.cc | 63 // TODO(asvitkine): Move over from metrics_log.cc |
| 65 return std::string(); | 64 return std::string(); |
| 66 } | 65 } |
| OLD | NEW |