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..07cc08391a292ba81ca5bfbfa4335d4354ac0504 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.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("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,18 @@ int DesktopDragDropClientWin::StartDragAndDrop( |
if (result != DRAGDROP_S_DROP) |
effect = DROPEFFECT_NONE; |
- return ui::DragDropTypes::DropEffectToDragOperation(effect); |
+ ui::DragDropTypes::DragOperation drag_operation = |
+ ui::DragDropTypes::DropEffectToDragOperation(effect); |
+ |
+ if (drag_operation != ui::DragDropTypes::DRAG_NONE) { |
mfomitchev
2015/01/14 17:03:41
I'd check for '==' (and swap the bodies)
caelyn
2015/01/21 16:29:53
Done.
|
+ UMA_HISTOGRAM_ENUMERATION("DragDrop.Drop", source, |
+ ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
+ } else { |
+ UMA_HISTOGRAM_ENUMERATION("DragDrop.Cancel", source, |
+ ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
+ } |
+ |
+ return drag_operation; |
} |
void DesktopDragDropClientWin::DragUpdate(aura::Window* target, |