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

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 WallpaperManagerBrowserTest 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
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;

Powered by Google App Engine
This is Rietveld 408576698