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

Unified Diff: ash/metrics/user_metrics_recorder.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ShelfBrowserTest. Created 4 years, 10 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 040fc76b659475f2f68f0ce4ea4a4c650508bac0..3ce6e719033a6ee886969f090482336d61e31973 100644
--- a/ash/metrics/user_metrics_recorder.cc
+++ b/ash/metrics/user_metrics_recorder.cc
@@ -6,12 +6,12 @@
#include "ash/metrics/desktop_task_switch_metric_recorder.h"
#include "ash/session/session_state_delegate.h"
+#include "ash/shelf/shelf.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"
#include "ash/shell_window_ids.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -623,7 +623,7 @@ void UserMetricsRecorder::OnShellShuttingDown() {
void UserMetricsRecorder::RecordPeriodicMetrics() {
ShelfLayoutManager* manager =
- ShelfLayoutManager::ForShelf(Shell::GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->shelf_layout_manager();
// TODO(bruthig): Investigating whether the check for |manager| is necessary
// and add tests if it is.
if (manager) {
« no previous file with comments | « ash/focus_cycler_unittest.cc ('k') | ash/root_window_controller.h » ('j') | ash/shelf/shelf.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698