summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorbruthig <bruthig@chromium.org>2015-04-08 07:37:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-08 14:38:00 +0000
commit917c61c1a5859243b159c86d42c4d8f7f523412d (patch)
tree0d6129bbb800e808b7ba9add508a272a03eb957c /ash
parent21669c13043b9b80f97f9b1536267a8da4436865 (diff)
downloadchromium_src-917c61c1a5859243b159c86d42c4d8f7f523412d.zip
chromium_src-917c61c1a5859243b159c86d42c4d8f7f523412d.tar.gz
chromium_src-917c61c1a5859243b159c86d42c4d8f7f523412d.tar.bz2
Partial revert of "Added metrics to count the number of items in the shelf."
Collecting the metrics was sometimes causing a crash and has been removed until the root cause is found. This is only a partial revert because items are not to be removed from tools/metrics/histograms/histograms.xml. BUG=474702 Review URL: https://codereview.chromium.org/1070693002 Cr-Commit-Position: refs/heads/master@{#324226}
Diffstat (limited to 'ash')
-rw-r--r--ash/metrics/user_metrics_recorder.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc
index ac1cf3b..c1c9e63 100644
--- a/ash/metrics/user_metrics_recorder.cc
+++ b/ash/metrics/user_metrics_recorder.cc
@@ -4,10 +4,7 @@
#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_item_types.h"
#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
#include "ash/shelf/shelf_view.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
@@ -124,29 +121,6 @@ int GetNumVisibleWindowsInPrimaryDisplay() {
return visible_window_count;
}
-void RecordShelfItemCounts() {
- ShelfDelegate* shelf_delegate = Shell::GetInstance()->GetShelfDelegate();
- int pinned_item_count = 0;
- int unpinned_item_count = 0;
-
- for (const ShelfItem& shelf_item :
- Shell::GetInstance()->shelf_model()->items()) {
- if (shelf_item.type != TYPE_APP_LIST) {
- if (shelf_delegate->IsAppPinned(
- shelf_delegate->GetAppIDForShelfID(shelf_item.id)))
- ++pinned_item_count;
- else
- ++unpinned_item_count;
- }
- }
-
- UMA_HISTOGRAM_COUNTS_100("Ash.Shelf.NumberOfItems",
- pinned_item_count + unpinned_item_count);
- UMA_HISTOGRAM_COUNTS_100("Ash.Shelf.NumberOfPinnedItems", pinned_item_count);
- UMA_HISTOGRAM_COUNTS_100("Ash.Shelf.NumberOfUnpinnedItems",
- unpinned_item_count);
-}
-
} // namespace
UserMetricsRecorder::UserMetricsRecorder() {
@@ -561,8 +535,6 @@ void UserMetricsRecorder::RecordPeriodicMetrics() {
UMA_HISTOGRAM_ENUMERATION("Ash.ActiveWindowShowTypeOverTime",
GetActiveWindowState(),
ACTIVE_WINDOW_STATE_TYPE_COUNT);
-
- RecordShelfItemCounts();
}
} // namespace ash