Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 800183005: Adding UMA stats for dragdrop events for both touch and mouse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding an explicit value to DragEventSource enum Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698