summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 05:01:55 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 05:01:55 +0000
commit1c0f13ce3a767d6fa768a9755bff034f116fca1d (patch)
tree9e3e11494adfae35543d6ae8a6694a9acf28fdcf
parent2c7925e33490073e1538195a265132b2a90329a0 (diff)
downloadchromium_src-1c0f13ce3a767d6fa768a9755bff034f116fca1d.zip
chromium_src-1c0f13ce3a767d6fa768a9755bff034f116fca1d.tar.gz
chromium_src-1c0f13ce3a767d6fa768a9755bff034f116fca1d.tar.bz2
Fix bad merge in https://codereview.chromium.org/73583003
BUG=323066 TEST=None TBR=harrym Review URL: https://codereview.chromium.org/102413008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241494 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/metrics/user_metrics_recorder.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc
index a08da8f..b0c384f 100644
--- a/ash/metrics/user_metrics_recorder.cc
+++ b/ash/metrics/user_metrics_recorder.cc
@@ -8,6 +8,7 @@
#include "ash/shelf/shelf_view.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
+#include "ash/wm/window_state.h"
#include "base/metrics/histogram.h"
#include "content/public/browser/user_metrics.h"
@@ -370,6 +371,45 @@ void UserMetricsRecorder::RecordPeriodicMetrics() {
-1),
internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT);
}
+
+ enum ActiveWindowShowType {
+ ACTIVE_WINDOW_SHOW_TYPE_NO_ACTIVE_WINDOW,
+ ACTIVE_WINDOW_SHOW_TYPE_OTHER,
+ ACTIVE_WINDOW_SHOW_TYPE_MAXIMIZED,
+ ACTIVE_WINDOW_SHOW_TYPE_FULLSCREEN,
+ ACTIVE_WINDOW_SHOW_TYPE_SNAPPED,
+ ACTIVE_WINDOW_SHOW_TYPE_COUNT
+ };
+
+ ActiveWindowShowType active_window_show_type =
+ ACTIVE_WINDOW_SHOW_TYPE_NO_ACTIVE_WINDOW;
+ wm::WindowState* active_window_state = ash::wm::GetActiveWindowState();
+ if (active_window_state) {
+ switch(active_window_state->window_show_type()) {
+ case wm::SHOW_TYPE_MAXIMIZED:
+ active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_MAXIMIZED;
+ break;
+ case wm::SHOW_TYPE_FULLSCREEN:
+ active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_FULLSCREEN;
+ break;
+ case wm::SHOW_TYPE_LEFT_SNAPPED:
+ case wm::SHOW_TYPE_RIGHT_SNAPPED:
+ active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_SNAPPED;
+ break;
+ case wm::SHOW_TYPE_DEFAULT:
+ case wm::SHOW_TYPE_NORMAL:
+ case wm::SHOW_TYPE_MINIMIZED:
+ case wm::SHOW_TYPE_INACTIVE:
+ case wm::SHOW_TYPE_DETACHED:
+ case wm::SHOW_TYPE_END:
+ case wm::SHOW_TYPE_AUTO_POSITIONED:
+ active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_OTHER;
+ break;
+ }
+ }
+ UMA_HISTOGRAM_ENUMERATION("Ash.ActiveWindowShowTypeOverTime",
+ active_window_show_type,
+ ACTIVE_WINDOW_SHOW_TYPE_COUNT);
}
} // namespace ash