Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Side by Side Diff: blimp/engine/app/blimp_stability_metrics_provider.h

Issue 2629743003: Remove all blimp engine code (Closed)
Patch Set: Use consistent comment style in //chrome Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 BLIMP_ENGINE_APP_BLIMP_STABILITY_METRICS_PROVIDER_H_
6 #define BLIMP_ENGINE_APP_BLIMP_STABILITY_METRICS_PROVIDER_H_
7
8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h"
10 #include "base/metrics/user_metrics.h"
11 #include "base/process/kill.h"
12 #include "components/metrics/metrics_provider.h"
13 #include "components/metrics/stability_metrics_helper.h"
14 #include "content/public/browser/browser_child_process_observer.h"
15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h"
17
18 class PrefService;
19
20 // BlimpStabilityMetricsProvider gathers and logs Blimp-specific stability-
21 // related metrics.
22 class BlimpStabilityMetricsProvider
23 : public metrics::MetricsProvider,
24 public content::BrowserChildProcessObserver,
25 public content::NotificationObserver {
26 public:
27 explicit BlimpStabilityMetricsProvider(PrefService* local_state);
28 ~BlimpStabilityMetricsProvider() override;
29
30 // metrics::MetricsDataProvider:
31 void OnRecordingEnabled() override;
32 void OnRecordingDisabled() override;
33 void ProvideStabilityMetrics(
34 metrics::SystemProfileProto* system_profile_proto) override;
35 void ClearSavedStabilityMetrics() override;
36
37 private:
38 FRIEND_TEST_ALL_PREFIXES(BlimpStabilityMetricsProviderTest,
39 BrowserChildProcessObserver);
40 FRIEND_TEST_ALL_PREFIXES(BlimpStabilityMetricsProviderTest,
41 NotificationObserver);
42
43 // content::NotificationObserver:
44 void Observe(int type,
45 const content::NotificationSource& source,
46 const content::NotificationDetails& details) override;
47
48 // content::BrowserChildProcessObserver:
49 void BrowserChildProcessCrashed(
50 const content::ChildProcessData& data,
51 int exit_code) override;
52
53 metrics::StabilityMetricsHelper helper_;
54
55 // Registrar for receiving stability-related notifications.
56 content::NotificationRegistrar registrar_;
57
58 DISALLOW_COPY_AND_ASSIGN(BlimpStabilityMetricsProvider);
59 };
60
61 #endif // BLIMP_ENGINE_APP_BLIMP_STABILITY_METRICS_PROVIDER_H_
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_permission_manager.cc ('k') | blimp/engine/app/blimp_stability_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698