| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_METRICS_RENDERER_UPTIME_METRICS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_METRICS_RENDERER_UPTIME_METRICS_PROVIDER_H_ |
| 7 |
| 8 #include "components/metrics/metrics_provider.h" |
| 9 #include "content/public/browser/notification_observer.h" |
| 10 #include "content/public/browser/notification_registrar.h" |
| 11 |
| 12 // ChromeStabilityMetricsProvider gathers and logs Chrome-specific stability- |
| 13 // related metrics. |
| 14 class RendererUptimeMetricsProvider : public metrics::MetricsProvider, |
| 15 public content::NotificationObserver { |
| 16 public: |
| 17 RendererUptimeMetricsProvider(); |
| 18 |
| 19 // metrics::MetricsProvider: |
| 20 void OnRecordingEnabled() override; |
| 21 void OnRecordingDisabled() override; |
| 22 |
| 23 // content::NotificationObserver: |
| 24 void Observe(int type, |
| 25 const content::NotificationSource& source, |
| 26 const content::NotificationDetails& details) override; |
| 27 |
| 28 private: |
| 29 // Registrar for receiving stability-related notifications. |
| 30 content::NotificationRegistrar registrar_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(RendererUptimeMetricsProvider); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_BROWSER_METRICS_RENDERER_UPTIME_METRICS_PROVIDER_H_ |
| OLD | NEW |