Chromium Code Reviews| Index: ash/metrics/user_metrics_recorder.cc |
| diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc |
| index 8577b9992b07ac03017d380d803ae6717bc47d6b..f475e96afb7fab13955ffaa615ea04295cab1b0e 100644 |
| --- a/ash/metrics/user_metrics_recorder.cc |
| +++ b/ash/metrics/user_metrics_recorder.cc |
| @@ -5,6 +5,7 @@ |
| #include "ash/metrics/user_metrics_recorder.h" |
| #include "ash/common/session/session_state_delegate.h" |
| +#include "ash/common/shelf/shelf_delegate.h" |
| #include "ash/common/shelf/shelf_item_types.h" |
| #include "ash/common/shelf/shelf_model.h" |
| #include "ash/common/shell_window_ids.h" |
| @@ -13,7 +14,6 @@ |
| #include "ash/common/wm_shell.h" |
| #include "ash/metrics/desktop_task_switch_metric_recorder.h" |
| #include "ash/shelf/shelf.h" |
| -#include "ash/shelf/shelf_delegate.h" |
| #include "ash/shelf/shelf_view.h" |
| #include "ash/shell.h" |
| #include "ash/wm/window_state_aura.h" |
| @@ -157,7 +157,7 @@ int GetNumVisibleWindowsInPrimaryDisplay() { |
| // Records the number of items in the shelf as an UMA statistic. |
| void RecordShelfItemCounts() { |
| - ShelfDelegate* shelf_delegate = Shell::GetInstance()->GetShelfDelegate(); |
| + ShelfDelegate* shelf_delegate = WmShell::Get()->shelf_delegate(); |
|
msw
2016/07/23 00:02:36
Couldn't this now be null if no shelves have calle
James Cook
2016/07/23 00:38:03
Added DCHECKs.
I thought the lazy construction be
|
| int pinned_item_count = 0; |
| int unpinned_item_count = 0; |