| 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 "components/metrics/metrics_service.h" | 5 #include "components/metrics/metrics_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/metrics/metrics_hashes.h" |
| 12 #include "base/metrics/statistics_recorder.h" | 13 #include "base/metrics/statistics_recorder.h" |
| 13 #include "base/prefs/testing_pref_service.h" | 14 #include "base/prefs/testing_pref_service.h" |
| 14 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
| 15 #include "components/compression/compression_utils.h" | 16 #include "components/compression/compression_utils.h" |
| 16 #include "components/metrics/client_info.h" | 17 #include "components/metrics/client_info.h" |
| 17 #include "components/metrics/metrics_hashes.h" | |
| 18 #include "components/metrics/metrics_log.h" | 18 #include "components/metrics/metrics_log.h" |
| 19 #include "components/metrics/metrics_pref_names.h" | 19 #include "components/metrics/metrics_pref_names.h" |
| 20 #include "components/metrics/metrics_state_manager.h" | 20 #include "components/metrics/metrics_state_manager.h" |
| 21 #include "components/metrics/test_metrics_provider.h" | 21 #include "components/metrics/test_metrics_provider.h" |
| 22 #include "components/metrics/test_metrics_service_client.h" | 22 #include "components/metrics/test_metrics_service_client.h" |
| 23 #include "components/variations/metrics_util.h" | 23 #include "components/variations/metrics_util.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 namespace metrics { | 26 namespace metrics { |
| 27 | 27 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 TestMetricsProvider* test_provider = new TestMetricsProvider(); | 382 TestMetricsProvider* test_provider = new TestMetricsProvider(); |
| 383 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider)); | 383 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider)); |
| 384 | 384 |
| 385 service.InitializeMetricsRecordingState(); | 385 service.InitializeMetricsRecordingState(); |
| 386 service.Stop(); | 386 service.Stop(); |
| 387 | 387 |
| 388 EXPECT_TRUE(test_provider->on_recording_disabled_called()); | 388 EXPECT_TRUE(test_provider->on_recording_disabled_called()); |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace metrics | 391 } // namespace metrics |
| OLD | NEW |