Commit 9e754fbe authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

[EmojiSuggest] Add record user action

Record user action when an emoji is suggested to get timestamp.
This is to figure out if some users get emoji suggested in a short
timespan.

Bug: b/168692236
Change-Id: I5ceb7c3c1846b9cae5a3c44a0ccc0bf62b7cb756
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434186
Commit-Queue: My Nguyen <myy@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarJing Wang <jiwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811494}
parent e91cdd79
......@@ -8,6 +8,7 @@
#include "base/feature_list.h"
#include "base/hash/hash.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/strings/string_util.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_finder.h"
......@@ -360,6 +361,8 @@ void AssistiveSuggester::RecordAssistiveMatchMetrics(const base::string16& text,
// Emoji suggestion match
} else if (emoji_suggester_.ShouldShowSuggestion(text_before_cursor)) {
RecordAssistiveMatchMetricsForAction(AssistiveType::kEmoji);
base::RecordAction(
base::UserMetricsAction("InputMethod.Assistive.EmojiSuggested"));
RecordAssistiveDisabledReasonForEmoji(GetDisabledReasonForEmoji());
}
}
......
......@@ -7613,6 +7613,14 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="InputMethod.Assistive.EmojiSuggested">
<owner>myy@chromium.org</owner>
<owner>essential-inputs-team@google.com</owner>
<description>
Recorded when users type some words and an emoji is suggested.
</description>
</action>
<action name="InputMethodOptions_Open_chewing">
<obsolete>
IMEs have since become extensions and no longer available as predetermined
......
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