| 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_log_manager.h" | 5 #include "components/metrics/metrics_log_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <string> | 9 #include <string> |
| 8 #include <utility> | 10 #include <utility> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/prefs/pref_registry_simple.h" | 13 #include "base/prefs/pref_registry_simple.h" |
| 12 #include "base/prefs/testing_pref_service.h" | 14 #include "base/prefs/testing_pref_service.h" |
| 13 #include "components/metrics/metrics_log.h" | 15 #include "components/metrics/metrics_log.h" |
| 14 #include "components/metrics/metrics_pref_names.h" | 16 #include "components/metrics/metrics_pref_names.h" |
| 15 #include "components/metrics/test_metrics_service_client.h" | 17 #include "components/metrics/test_metrics_service_client.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 log_manager.FinishCurrentLog(); | 297 log_manager.FinishCurrentLog(); |
| 296 log_manager.DiscardStagedLog(); | 298 log_manager.DiscardStagedLog(); |
| 297 | 299 |
| 298 log_manager.PersistUnsentLogs(); | 300 log_manager.PersistUnsentLogs(); |
| 299 EXPECT_EQ(0U, pref_service.TypeCount(MetricsLog::INITIAL_STABILITY_LOG)); | 301 EXPECT_EQ(0U, pref_service.TypeCount(MetricsLog::INITIAL_STABILITY_LOG)); |
| 300 EXPECT_EQ(1U, pref_service.TypeCount(MetricsLog::ONGOING_LOG)); | 302 EXPECT_EQ(1U, pref_service.TypeCount(MetricsLog::ONGOING_LOG)); |
| 301 } | 303 } |
| 302 } | 304 } |
| 303 | 305 |
| 304 } // namespace metrics | 306 } // namespace metrics |
| OLD | NEW |