Index: ash/wm/dock/docked_window_resizer.cc |
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc |
index d0b86f9aed60fe4e2442806684c3b805e8e761b5..91486c6285387731e070b2223f01a246eaf24415 100644 |
--- a/ash/wm/dock/docked_window_resizer.cc |
+++ b/ash/wm/dock/docked_window_resizer.cc |
@@ -299,13 +299,15 @@ DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion( |
action = was_docked_ ? DOCKED_ACTION_UNDOCK : DOCKED_ACTION_NONE; |
} |
} else { |
- // Docked state was not changed but still need to record a UMA action. |
+ // |action| is recorded in UMA and used to maintain |window_state_|. |
if (is_resized && is_docked_ && was_docked_) |
action = DOCKED_ACTION_RESIZE; |
else if (is_docked_ && was_docked_) |
action = DOCKED_ACTION_REORDER; |
else if (is_docked_ && !was_docked_) |
action = DOCKED_ACTION_DOCK; |
+ else if (!is_docked_ && was_docked_) |
+ action = DOCKED_ACTION_UNDOCK; |
else |
action = DOCKED_ACTION_NONE; |
} |