| 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 #ifndef COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ | 5 #ifndef COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ |
| 6 #define COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ | 6 #define COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Clears the gathered stability metrics. | 29 // Clears the gathered stability metrics. |
| 30 void ClearSavedStabilityMetrics(); | 30 void ClearSavedStabilityMetrics(); |
| 31 | 31 |
| 32 // Records a browser child process crash. | 32 // Records a browser child process crash. |
| 33 void BrowserChildProcessCrashed(); | 33 void BrowserChildProcessCrashed(); |
| 34 | 34 |
| 35 // Logs the initiation of a page load. | 35 // Logs the initiation of a page load. |
| 36 void LogLoadStarted(); | 36 void LogLoadStarted(); |
| 37 | 37 |
| 38 // Records a renderer process crash. | 38 // Records a renderer process crash. |
| 39 void LogRendererCrash(bool was_exception_process, | 39 void LogRendererCrash(bool was_extension_process, |
| 40 base::TerminationStatus status, | 40 base::TerminationStatus status, |
| 41 int exit_code); | 41 int exit_code); |
| 42 | 42 |
| 43 // Records that a new renderer process was successfully launched. |
| 44 void LogRendererLaunched(bool was_extension_process); |
| 45 |
| 43 // Records a renderer process hang. | 46 // Records a renderer process hang. |
| 44 void LogRendererHang(); | 47 void LogRendererHang(); |
| 45 | 48 |
| 46 // Registers local state prefs used by this class. | 49 // Registers local state prefs used by this class. |
| 47 static void RegisterPrefs(PrefRegistrySimple* registry); | 50 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 48 | 51 |
| 49 private: | 52 private: |
| 50 // Increment an Integer pref value specified by |path|. | 53 // Increment an Integer pref value specified by |path|. |
| 51 void IncrementPrefValue(const char* path); | 54 void IncrementPrefValue(const char* path); |
| 52 | 55 |
| 53 // Increment a 64-bit Integer pref value specified by |path|. | 56 // Increment a 64-bit Integer pref value specified by |path|. |
| 54 void IncrementLongPrefsValue(const char* path); | 57 void IncrementLongPrefsValue(const char* path); |
| 55 | 58 |
| 56 PrefService* local_state_; | 59 PrefService* local_state_; |
| 57 | 60 |
| 58 DISALLOW_COPY_AND_ASSIGN(StabilityMetricsHelper); | 61 DISALLOW_COPY_AND_ASSIGN(StabilityMetricsHelper); |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 } // namespace metrics | 64 } // namespace metrics |
| 62 | 65 |
| 63 #endif // COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ | 66 #endif // COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ |
| OLD | NEW |