Commit 74677b58 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[VK] Change how VirtualKeyboard.ContainerBehavior is recorded.

We move the recording of InputMethod.VirtualKeyboard.ContainerBehavior
to the end of ShowKeyboard, so we get a sample every time a floating
or docked keyboard is shown. We also account for users switching
between the two modes, as switching requires hiding and showing the
virtual keyboard.

See the bug for more about why this is needed.

Bug: 887248
Change-Id: Icd8b2fbf826a0dba7b32cabb6c7b9afcdde3fcdd
Reviewed-on: https://chromium-review.googlesource.com/1235266Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592973}
parent aebfdc01
...@@ -717,6 +717,9 @@ void KeyboardController::PopulateKeyboardContent( ...@@ -717,6 +717,9 @@ void KeyboardController::PopulateKeyboardContent(
queued_container_type_ = nullptr; queued_container_type_ = nullptr;
ChangeState(KeyboardControllerState::SHOWN); ChangeState(KeyboardControllerState::SHOWN);
UMA_HISTOGRAM_ENUMERATION("InputMethod.VirtualKeyboard.ContainerBehavior",
GetActiveContainerType(), ContainerType::COUNT);
} }
bool KeyboardController::WillHideKeyboard() const { bool KeyboardController::WillHideKeyboard() const {
...@@ -853,9 +856,6 @@ void KeyboardController::SetContainerType( ...@@ -853,9 +856,6 @@ void KeyboardController::SetContainerType(
return; return;
} }
UMA_HISTOGRAM_ENUMERATION("InputMethod.VirtualKeyboard.ContainerBehavior",
type, ContainerType::COUNT);
if (state_ == KeyboardControllerState::SHOWN) { if (state_ == KeyboardControllerState::SHOWN) {
// Keyboard is already shown. Hiding the keyboard at first then switching // Keyboard is already shown. Hiding the keyboard at first then switching
// container type. // container type.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment