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

Unified Diff: ash/metrics/user_metrics_recorder.cc

Issue 1070693002: Partial revert of "Added metrics to count the number of items in the shelf." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/metrics/user_metrics_recorder.cc
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc
index ac1cf3bac5cf5cd9bcf153051f24db6cf5124b35..c1c9e631aeaeff5ec581bd8a35b96c74bd6f5340 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698