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

Side by Side Diff: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics_mac.h

Issue 641453003: Add metrics for the number of attached displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ENUMERATION -> COUNTS_100 Created 6 years, 2 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 2014 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_CHROME_BROWSER_MAIN_EXTRA_PARTS_METRICS_MAC_H_
6 #define CHROME_BROWSER_METRICS_CHROME_BROWSER_MAIN_EXTRA_PARTS_METRICS_MAC_H_
7
8 #include "base/macros.h"
9 #include "ui/gfx/display_observer.h"
10
11 // This class records OSX metrics at start up, and during the lifetime of the
12 // application.
13 class ChromeBrowserMainExtraPartsMetricsMac : public gfx::DisplayObserver {
14 public:
15 ChromeBrowserMainExtraPartsMetricsMac();
16 virtual ~ChromeBrowserMainExtraPartsMetricsMac() override;
17
18 private:
19 // DisplayObserver overrides.
20 virtual void OnDisplayAdded(const gfx::Display& new_display) override;
21 virtual void OnDisplayRemoved(const gfx::Display& old_display) override;
22 virtual void OnDisplayMetricsChanged(const gfx::Display& display,
23 uint32_t changed_metrics) override;
24
25 // If the number of displays has changed, emit a UMA metric.
26 void EmitDisplaysChangedMetric();
27
28 // A cached value for the number of displays.
29 int displayCount_;
Robert Sesek 2014/10/10 15:17:07 naming: display_count_
erikchen 2014/10/10 17:01:54 Done.
30
31 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsMetricsMac);
32 };
33
34 #endif // CHROME_BROWSER_METRICS_CHROME_BROWSER_MAIN_EXTRA_PARTS_METRICS_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698