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

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

Issue 788883004: Not counting nested loops as time spent in a task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « ui/gfx/win/hwnd_util.cc ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f471b3254bf1825823c32f48e1c72e1105b0d757..d135a8977a06f88374a331a3990b12e4922d0f54 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/tracked_objects.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/drag_source_win.h"
#include "ui/base/dragdrop/drop_target_event.h"
@@ -36,9 +37,14 @@ int DesktopDragDropClientWin::StartDragAndDrop(
drag_source_ = new ui::DragSourceWin;
DWORD effect;
+
+ // Use task stopwatch to exclude the drag-drop time current task, if any.
+ tracked_objects::TaskStopwatch stopwatch;
+ stopwatch.Start();
HRESULT result = DoDragDrop(
ui::OSExchangeDataProviderWin::GetIDataObject(data), drag_source_.get(),
ui::DragDropTypes::DragOperationToDropEffect(operation), &effect);
+ stopwatch.Stop();
drag_drop_in_progress_ = false;
« no previous file with comments | « ui/gfx/win/hwnd_util.cc ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698