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

Unified Diff: ash/metrics/user_metrics_recorder.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again Created 4 years, 5 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 | « ash/common/wm_shell.cc ('k') | ash/shelf/shelf.h » ('j') | 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 8577b9992b07ac03017d380d803ae6717bc47d6b..fdd2e41e15034d56a737810a80932b48dd1c5f0c 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,9 @@ 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();
+ DCHECK(shelf_delegate);
+
int pinned_item_count = 0;
int unpinned_item_count = 0;
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/shelf/shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698