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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/metrics/metrics_hashes.h" | 15 #include "base/metrics/metrics_hashes.h" |
16 #include "base/metrics/statistics_recorder.h" | 16 #include "base/metrics/statistics_recorder.h" |
17 #include "base/prefs/testing_pref_service.h" | 17 #include "base/prefs/testing_pref_service.h" |
18 #include "base/threading/platform_thread.h" | 18 #include "base/threading/platform_thread.h" |
19 #include "components/compression/compression_utils.h" | |
20 #include "components/metrics/client_info.h" | 19 #include "components/metrics/client_info.h" |
21 #include "components/metrics/metrics_log.h" | 20 #include "components/metrics/metrics_log.h" |
22 #include "components/metrics/metrics_pref_names.h" | 21 #include "components/metrics/metrics_pref_names.h" |
23 #include "components/metrics/metrics_state_manager.h" | 22 #include "components/metrics/metrics_state_manager.h" |
24 #include "components/metrics/test_metrics_provider.h" | 23 #include "components/metrics/test_metrics_provider.h" |
25 #include "components/metrics/test_metrics_service_client.h" | 24 #include "components/metrics/test_metrics_service_client.h" |
26 #include "components/variations/metrics_util.h" | 25 #include "components/variations/metrics_util.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "third_party/zlib/google/compression_utils.h" |
28 | 28 |
29 namespace metrics { | 29 namespace metrics { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 void StoreNoClientInfoBackup(const ClientInfo& /* client_info */) { | 33 void StoreNoClientInfoBackup(const ClientInfo& /* client_info */) { |
34 } | 34 } |
35 | 35 |
36 scoped_ptr<ClientInfo> ReturnNoBackup() { | 36 scoped_ptr<ClientInfo> ReturnNoBackup() { |
37 return scoped_ptr<ClientInfo>(); | 37 return scoped_ptr<ClientInfo>(); |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 TestMetricsProvider* test_provider = new TestMetricsProvider(); | 391 TestMetricsProvider* test_provider = new TestMetricsProvider(); |
392 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider)); | 392 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider)); |
393 | 393 |
394 service.InitializeMetricsRecordingState(); | 394 service.InitializeMetricsRecordingState(); |
395 service.Stop(); | 395 service.Stop(); |
396 | 396 |
397 EXPECT_TRUE(test_provider->on_recording_disabled_called()); | 397 EXPECT_TRUE(test_provider->on_recording_disabled_called()); |
398 } | 398 } |
399 | 399 |
400 } // namespace metrics | 400 } // namespace metrics |
OLD | NEW |