0

Remove expired histograms VirtualKeyboard.InitLatency.FirstLoad, VirtualKeyboard.KeyboardControlEvent, VirtualKeyboard.LingeringIntermediateState

These histograms haven't been recorded since M85 so removal seems to be
the correct path here. This is a code-health task.

Bug: 1384784
Change-Id: Iaf6e68d08eab4bd6436798fb722e91f3615b016d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4294578
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113155}
This commit is contained in:
Ari Chivukula
2023-03-06 00:03:46 +00:00
committed by Chromium LUCI CQ
parent ccd28ef84c
commit 4f47fa4938
3 changed files with 0 additions and 89 deletions
ash/keyboard/ui
tools/metrics/histograms/metadata/others

@ -70,20 +70,6 @@ constexpr base::TimeDelta kReportLingeringStateDelay = base::Milliseconds(5000);
// after the user enters their username.
constexpr base::TimeDelta kTransientBlurThreshold = base::Milliseconds(3500);
// An enumeration of different keyboard control events that should be logged.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class KeyboardControlEvent {
kShow = 0,
kHideAuto = 1,
kHideUser = 2,
kMaxValue = kHideUser
};
void LogKeyboardControlEvent(KeyboardControlEvent event) {
UMA_HISTOGRAM_ENUMERATION("VirtualKeyboard.KeyboardControlEvent", event);
}
class VirtualKeyboardController : public ui::VirtualKeyboardController {
public:
explicit VirtualKeyboardController(
@ -561,19 +547,6 @@ void KeyboardUIController::HideKeyboard(HideReason reason) {
case KeyboardUIState::kWillHide:
case KeyboardUIState::kShown: {
// Log whether this was a user or system (automatic) action.
switch (reason) {
case HIDE_REASON_SYSTEM_EXPLICIT:
case HIDE_REASON_SYSTEM_IMPLICIT:
case HIDE_REASON_SYSTEM_TEMPORARY:
LogKeyboardControlEvent(KeyboardControlEvent::kHideAuto);
break;
case HIDE_REASON_USER_EXPLICIT:
case HIDE_REASON_USER_IMPLICIT:
LogKeyboardControlEvent(KeyboardControlEvent::kHideUser);
break;
}
NotifyKeyboardBoundsChanging(gfx::Rect());
set_keyboard_locked(false);
@ -658,8 +631,6 @@ void KeyboardUIController::HideAnimationFinished() {
// private
void KeyboardUIController::ShowAnimationFinished() {
MarkKeyboardLoadFinished();
// Notify observers after animation finished to prevent reveal desktop
// background during animation.
// If the current state is not SHOWN, it means the state was changed after the
@ -860,7 +831,6 @@ void KeyboardUIController::OnVirtualKeyboardVisibilityChangedIfEnabled(
void KeyboardUIController::ShowKeyboardInternal(
aura::Window* target_container) {
MarkKeyboardLoadStarted();
PopulateKeyboardContent(target_container);
UpdateInputMethodObserver();
}
@ -904,7 +874,6 @@ void KeyboardUIController::PopulateKeyboardContent(
// are at begin states for animation.
container_behavior_->InitializeShowAnimationStartingState(keyboard_window);
LogKeyboardControlEvent(KeyboardControlEvent::kShow);
RecordUkmKeyboardShown();
ui::LayerAnimator* container_animator =
@ -970,8 +939,6 @@ void KeyboardUIController::ChangeState(KeyboardUIState state) {
void KeyboardUIController::ReportLingeringState() {
LOG(ERROR) << "KeyboardUIController lingering in "
<< StateToStr(model_.state());
UMA_HISTOGRAM_ENUMERATION("VirtualKeyboard.LingeringIntermediateState",
model_.state());
}
gfx::Rect KeyboardUIController::GetWorkspaceOccludedBoundsInScreen() const {
@ -1163,26 +1130,6 @@ void KeyboardUIController::EnsureCaretInWorkArea(
}
}
void KeyboardUIController::MarkKeyboardLoadStarted() {
if (!keyboard_load_time_logged_)
keyboard_load_time_start_ = base::Time::Now();
}
void KeyboardUIController::MarkKeyboardLoadFinished() {
// Possible to get a load finished without a start if navigating directly to
// chrome://keyboard.
if (keyboard_load_time_start_.is_null())
return;
if (keyboard_load_time_logged_)
return;
// Log the delta only once.
UMA_HISTOGRAM_TIMES("VirtualKeyboard.InitLatency.FirstLoad",
base::Time::Now() - keyboard_load_time_start_);
keyboard_load_time_logged_ = true;
}
void KeyboardUIController::EnableFlagsChanged() {
for (auto& observer : observer_list_)
observer.OnKeyboardEnableFlagsChanged(keyboard_enable_flags_);

@ -405,15 +405,6 @@ class KEYBOARD_EXPORT KeyboardUIController
// window).
void EnsureCaretInWorkArea(const gfx::Rect& occluded_bounds_in_screen);
// Marks that the keyboard load has started. This is used to measure the time
// it takes to fully load the keyboard. This should be called before
// MarkKeyboardLoadFinished.
void MarkKeyboardLoadStarted();
// Marks that the keyboard load has ended. This finishes measuring that the
// keyboard is loaded.
void MarkKeyboardLoadFinished();
// Called when the enable flags change. Notifies observers of the change.
void EnableFlagsChanged();
@ -467,9 +458,6 @@ class KEYBOARD_EXPORT KeyboardUIController
DisplayUtil display_util_;
bool keyboard_load_time_logged_ = false;
base::Time keyboard_load_time_start_;
base::WeakPtrFactory<KeyboardUIController>
weak_factory_report_lingering_state_{this};
base::WeakPtrFactory<KeyboardUIController> weak_factory_will_hide_{this};

@ -14362,30 +14362,6 @@ regressions. -->
</summary>
</histogram>
<histogram name="VirtualKeyboard.InitLatency.FirstLoad" units="ms"
expires_after="M85">
<owner>oka@chromium.org</owner>
<summary>Latency of the keyboard being loaded for the first time.</summary>
</histogram>
<histogram name="VirtualKeyboard.KeyboardControlEvent"
enum="KeyboardControlEvent" expires_after="M85">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
A count of various control events that can occur on the virtual keyboard,
such as showing and hiding.
</summary>
</histogram>
<histogram name="VirtualKeyboard.LingeringIntermediateState"
enum="VirtualKeyboardControllerState" expires_after="M85">
<owner>oka@chromium.org</owner>
<summary>
Records whenever an intermediate keyboard state has been active for longer
than a fixed timeout.
</summary>
</histogram>
<histogram name="VoiceInteraction.AssistantActionPerformed{Source}"
enum="AssistantActionPerformed" expires_after="2023-07-05">
<owner>basiaz@google.com</owner>