| Index: ash/drag_drop/drag_drop_controller.cc
|
| diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
|
| index 695c7737865c0919e3f86337ba8d7f80e870aa1b..7b8f2cd36dea2201b033334b661828fece8ef0d4 100644
|
| --- a/ash/drag_drop/drag_drop_controller.cc
|
| +++ b/ash/drag_drop/drag_drop_controller.cc
|
| @@ -9,6 +9,7 @@
|
| #include "ash/shell.h"
|
| #include "base/bind.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "base/run_loop.h"
|
| #include "ui/aura/client/capture_client.h"
|
| #include "ui/aura/env.h"
|
| @@ -159,6 +160,9 @@ int DragDropController::StartDragAndDrop(
|
| provider->GetDragImage().size().IsEmpty())
|
| return 0;
|
|
|
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Start", source,
|
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT);
|
| +
|
| current_drag_event_source_ = source;
|
| DragDropTracker* tracker =
|
| new DragDropTracker(root_window, drag_drop_window_delegate_.get());
|
| @@ -310,10 +314,15 @@ void DragDropController::Drop(aura::Window* target,
|
| *drag_data_, event.location(), event.root_location(), drag_operation_);
|
| e.set_flags(event.flags());
|
| drag_operation_ = delegate->OnPerformDrop(e);
|
| - if (drag_operation_ == 0)
|
| + if (drag_operation_ == 0) {
|
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Cancel", current_drag_event_source_,
|
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT);
|
| StartCanceledAnimation(kCancelAnimationDuration);
|
| - else
|
| + } else {
|
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Drop", current_drag_event_source_,
|
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT);
|
| drag_image_.reset();
|
| + }
|
| } else {
|
| drag_image_.reset();
|
| }
|
| @@ -324,6 +333,8 @@ void DragDropController::Drop(aura::Window* target,
|
| }
|
|
|
| void DragDropController::DragCancel() {
|
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Cancel", current_drag_event_source_,
|
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT);
|
| DoDragCancel(kCancelAnimationDuration);
|
| }
|
|
|
| @@ -482,9 +493,9 @@ void DragDropController::AnimationEnded(const gfx::Animation* animation) {
|
| drag_image_.reset();
|
| if (pending_long_tap_) {
|
| // If not in a nested message loop, we can forward the long tap right now.
|
| - if (!should_block_during_drag_drop_)
|
| + if (!should_block_during_drag_drop_) {
|
| ForwardPendingLongTap();
|
| - else {
|
| + } else {
|
| // See comment about this in OnGestureEvent().
|
| base::MessageLoopForUI::current()->PostTask(
|
| FROM_HERE,
|
|
|