| Index: chrome/browser/metrics/metrics_service_unittest.cc
|
| diff --git a/chrome/browser/metrics/metrics_service_unittest.cc b/chrome/browser/metrics/metrics_service_unittest.cc
|
| index 163be783e2227534e3da4a19a44bbba12282194e..a374d8b02f4e92a401545a9398eb24bbb4593e88 100644
|
| --- a/chrome/browser/metrics/metrics_service_unittest.cc
|
| +++ b/chrome/browser/metrics/metrics_service_unittest.cc
|
| @@ -34,10 +34,31 @@ class TestMetricsService : public MetricsService {
|
| DISALLOW_COPY_AND_ASSIGN(TestMetricsService);
|
| };
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +class TestMetricsLogChromeOS : public MetricsLogChromeOS {
|
| + public:
|
| + explicit TestMetricsLogChromeOS(
|
| + metrics::SystemProfileProto* system_profile)
|
| + : MetricsLogChromeOS(system_profile) {
|
| + }
|
| +
|
| + protected:
|
| + // Don't touch bluetooth information, as it won't be correctly initialized.
|
| + virtual void WriteBluetoothProto(
|
| + metrics::SystemProfileProto::Hardware* hardware) OVERRIDE {
|
| + }
|
| +};
|
| +#endif // OS_CHROMEOS
|
| +
|
| class TestMetricsLog : public MetricsLog {
|
| public:
|
| TestMetricsLog(const std::string& client_id, int session_id)
|
| - : MetricsLog(client_id, session_id) {}
|
| + : MetricsLog(client_id, session_id) {
|
| +#if defined(OS_CHROMEOS)
|
| + metrics_log_chromeos_.reset(new TestMetricsLogChromeOS(
|
| + MetricsLog::uma_proto()->mutable_system_profile()));
|
| +#endif // OS_CHROMEOS
|
| + }
|
| virtual ~TestMetricsLog() {}
|
|
|
| private:
|
| @@ -53,10 +74,6 @@ class TestMetricsLog : public MetricsLog {
|
| return 1;
|
| }
|
|
|
| - virtual void WriteBluetoothProto(
|
| - metrics::SystemProfileProto::Hardware* hardware) OVERRIDE {
|
| - }
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(TestMetricsLog);
|
| };
|
|
|
|
|