Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
| index 8a56b8de9689f8132adc9f2190b3154f4dced4b0..ab79efa8f6c7c26d160953f48a1436f96773beee 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/event_types.h" |
| #include "base/lazy_instance.h" |
| #include "base/message_loop/message_loop.h" |
| +#include "base/metrics/histogram_macros.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| #include "ui/aura/client/capture_client.h" |
| #include "ui/aura/window.h" |
| @@ -610,6 +611,10 @@ void DesktopDragDropClientAuraX11::OnXdndDrop( |
| event.set_flags(XGetModifiers()); |
| } |
| + if (!IsDragDropInProgress()) { |
| + UMA_HISTOGRAM_COUNTS("DragDrop.ExternalOriginDrop", 1); |
| + } |
| + |
| drag_operation = delegate->OnPerformDrop(event); |
| } |
| @@ -646,6 +651,9 @@ int DesktopDragDropClientAuraX11::StartDragAndDrop( |
| const gfx::Point& root_location, |
| int operation, |
| ui::DragDropTypes::DragEventSource source) { |
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Start", source, |
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
| + |
| source_current_window_ = None; |
| DCHECK(!g_current_drag_drop_client); |
| g_current_drag_drop_client = this; |
| @@ -698,6 +706,14 @@ int DesktopDragDropClientAuraX11::StartDragAndDrop( |
| source_window, |
| cursor_manager_->GetInitializedCursor(ui::kCursorGrabbing)); |
| + if (negotiated_operation_ == ui::DragDropTypes::DRAG_NONE) { |
|
pkotwicz
2015/01/22 19:00:30
Can you please change the "alive if statement" to
caelyn
2015/01/22 21:13:08
I moved if (negotiated_operation == ...) section i
|
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Cancel", source, |
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
| + } else { |
| + UMA_HISTOGRAM_ENUMERATION("DragDrop.Drop", source, |
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_COUNT); |
| + } |
| + |
| if (alive) { |
| drag_widget_.reset(); |