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

Unified Diff: ash/frame/caption_buttons/frame_caption_button_container_view.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. Created 4 years, 6 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/accelerators/exit_warning_handler.cc ('k') | ash/frame/caption_buttons/frame_size_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/caption_buttons/frame_caption_button_container_view.cc
diff --git a/ash/frame/caption_buttons/frame_caption_button_container_view.cc b/ash/frame/caption_buttons/frame_caption_button_container_view.cc
index f1a3c43a390c87babd5b99120d21bde8680bbdc6..028297e443f8bec6d563bb4f72bec11fe009accd 100644
--- a/ash/frame/caption_buttons/frame_caption_button_container_view.cc
+++ b/ash/frame/caption_buttons/frame_caption_button_container_view.cc
@@ -8,9 +8,9 @@
#include <map>
#include "ash/common/ash_switches.h"
+#include "ash/common/wm_shell.h"
#include "ash/frame/caption_buttons/frame_caption_button.h"
#include "ash/frame/caption_buttons/frame_size_button.h"
-#include "ash/metrics/user_metrics_recorder.h"
#include "ash/shell.h"
#include "ash/touch/touch_uma.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
@@ -320,20 +320,19 @@ void FrameCaptionButtonContainerView::ButtonPressed(views::Button* sender,
// Abort any animations of the button icons.
SetButtonsToNormal(ANIMATE_NO);
- ash::UserMetricsAction action =
- ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MINIMIZE;
+ UserMetricsAction action = UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MINIMIZE;
if (sender == minimize_button_) {
frame_->Minimize();
} else if (sender == size_button_) {
if (frame_->IsFullscreen()) { // Can be clicked in immersive fullscreen.
frame_->Restore();
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN;
+ action = UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN;
} else if (frame_->IsMaximized()) {
frame_->Restore();
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_RESTORE;
+ action = UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_RESTORE;
} else {
frame_->Maximize();
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE;
+ action = UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE;
}
if (event.IsGestureEvent()) {
@@ -342,11 +341,11 @@ void FrameCaptionButtonContainerView::ButtonPressed(views::Button* sender,
}
} else if (sender == close_button_) {
frame_->Close();
- action = ash::UMA_WINDOW_CLOSE_BUTTON_CLICK;
+ action = UMA_WINDOW_CLOSE_BUTTON_CLICK;
} else {
return;
}
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(action);
+ WmShell::Get()->RecordUserMetricsAction(action);
}
bool FrameCaptionButtonContainerView::IsMinimizeButtonVisible() const {
« no previous file with comments | « ash/accelerators/exit_warning_handler.cc ('k') | ash/frame/caption_buttons/frame_size_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698