| 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..1c53068521297533c0cb5dfd9b26d33d57c38139 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("Event.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());
|
| @@ -222,6 +226,14 @@ int DragDropController::StartDragAndDrop(
|
| run_loop.Run();
|
| }
|
|
|
| + if (drag_operation_ == 0) {
|
| + 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);
|
| + }
|
| +
|
| if (!cancel_animation_.get() || !cancel_animation_->is_animating() ||
|
| !pending_long_tap_.get()) {
|
| // If drag cancel animation is running, this cleanup is done when the
|
| @@ -482,9 +494,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,
|
|
|