| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/stability_metrics_helper.h" | 5 #include "components/metrics/stability_metrics_helper.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" |
| 8 #include "components/metrics/proto/system_profile.pb.h" | 9 #include "components/metrics/proto/system_profile.pb.h" |
| 9 #include "components/prefs/pref_service.h" | 10 #include "components/prefs/pref_service.h" |
| 10 #include "components/prefs/scoped_user_pref_update.h" | 11 #include "components/prefs/scoped_user_pref_update.h" |
| 11 #include "components/prefs/testing_pref_service.h" | 12 #include "components/prefs/testing_pref_service.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace metrics { | 15 namespace metrics { |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 system_profile.Clear(); | 88 system_profile.Clear(); |
| 88 helper.ProvideStabilityMetrics(&system_profile); | 89 helper.ProvideStabilityMetrics(&system_profile); |
| 89 | 90 |
| 90 EXPECT_EQ(0, system_profile.stability().renderer_crash_count()); | 91 EXPECT_EQ(0, system_profile.stability().renderer_crash_count()); |
| 91 EXPECT_EQ(1, system_profile.stability().extension_renderer_crash_count()); | 92 EXPECT_EQ(1, system_profile.stability().extension_renderer_crash_count()); |
| 92 EXPECT_EQ( | 93 EXPECT_EQ( |
| 93 1, system_profile.stability().extension_renderer_failed_launch_count()); | 94 1, system_profile.stability().extension_renderer_failed_launch_count()); |
| 94 } | 95 } |
| 95 | 96 |
| 96 } // namespace metrics | 97 } // namespace metrics |
| OLD | NEW |