blob: 925557dd7b088507482235e9aaf21b6e48da9bad [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/keyboard/keyboard_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "ui/base/ui_base_features.h"
namespace keyboard {
void RecordUkmKeyboardShown(ukm::SourceId source,
const ui::TextInputType& input_type) {
if (source == ukm::kInvalidSourceId ||
!base::FeatureList::IsEnabled(features::kEnableVirtualKeyboardUkm)) {
return;
}
ukm::builders::VirtualKeyboard_Open(source)
.SetTextInputType(input_type)
.Record(ukm::UkmRecorder::Get());
}
} // namespace keyboard