Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc |
index 49c20e9095ddc84cb818dedecaff2cc945d4e53d..25699e500dccb2fc9600753792c9369fba65f860 100644 |
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc |
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc |
@@ -4,6 +4,7 @@ |
#include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" |
+#include "base/metrics/histogram_macros.h" |
#include "base/tracked_objects.h" |
#include "ui/base/dragdrop/drag_drop_types.h" |
#include "ui/base/dragdrop/drag_source_win.h" |
@@ -45,6 +46,9 @@ int DesktopDragDropClientWin::StartDragAndDrop( |
DWORD effect; |
+ UMA_HISTOGRAM_ENUMERATION("Event.DragDrop.Start", source, |
+ ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
+ |
// Use task stopwatch to exclude the drag-drop time current task, if any. |
tracked_objects::TaskStopwatch stopwatch; |
stopwatch.Start(); |
@@ -59,7 +63,17 @@ int DesktopDragDropClientWin::StartDragAndDrop( |
if (result != DRAGDROP_S_DROP) |
effect = DROPEFFECT_NONE; |
- return ui::DragDropTypes::DropEffectToDragOperation(effect); |
+ int drag_operation = ui::DragDropTypes::DropEffectToDragOperation(effect); |
+ |
+ if (drag_operation == ui::DragDropTypes::DRAG_NONE) { |
+ UMA_HISTOGRAM_ENUMERATION("Event.DragDrop.Cancel", source, |
+ ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
+ } else { |
+ UMA_HISTOGRAM_ENUMERATION("Event.DragDrop.Drop", source, |
+ ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
+ } |
+ |
+ return drag_operation; |
} |
void DesktopDragDropClientWin::DragUpdate(aura::Window* target, |