Commit 388c97d3 authored by Livvie Lin's avatar Livvie Lin Committed by Commit Bot

Remove Omnibox.ElisionConfig and Omnibox.ShowFullUrlsEnabled

Omnibox context menu show full URLs option is fully launched, so these
histograms are no longer needed. This CL removes instrumentation from
code and marks the histograms as obsolete.

Bug: 1138297
Change-Id: I511b460e9358a433ecd50d4c83577361d641f743
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472583
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarWeilun Shi <sweilun@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818085}
parent 7cb9df47
......@@ -1394,7 +1394,6 @@ void ToggleShowFullURLs(Browser* browser) {
omnibox::kPreventUrlElisionsInOmnibox);
browser->profile()->GetPrefs()->SetBoolean(
omnibox::kPreventUrlElisionsInOmnibox, !pref_enabled);
UMA_HISTOGRAM_BOOLEAN("Omnibox.ShowFullUrlsEnabled", !pref_enabled);
}
void ShowAppMenu(Browser* browser) {
......
......@@ -71,7 +71,6 @@ bool ChromeLocationBarModelDelegate::GetURL(GURL* url) const {
}
bool ChromeLocationBarModelDelegate::ShouldPreventElision() {
RecordElisionConfig();
if (GetElisionConfig() != ELISION_CONFIG_DEFAULT) {
return true;
}
......@@ -237,18 +236,6 @@ ChromeLocationBarModelDelegate::GetElisionConfig() const {
return ELISION_CONFIG_DEFAULT;
}
void ChromeLocationBarModelDelegate::RecordElisionConfig() {
Profile* const profile = GetProfile();
// Only record metrics once for this object, and only record if the profile
// has already been created to avoid false logging of the default config.
if (elision_config_recorded_ || !profile) {
return;
}
UMA_HISTOGRAM_ENUMERATION("Omnibox.ElisionConfig", GetElisionConfig(),
ELISION_CONFIG_MAX);
elision_config_recorded_ = true;
}
AutocompleteClassifier*
ChromeLocationBarModelDelegate::GetAutocompleteClassifier() {
Profile* const profile = GetProfile();
......
......@@ -85,12 +85,6 @@ class ChromeLocationBarModelDelegate : public LocationBarModelDelegate {
// Helper method that returns the state of URL elision in the omnibox.
ElisionConfig GetElisionConfig() const;
// Records ElisionConfig in UMA histogram once for this object.
void RecordElisionConfig();
// Whether elision metrics have already been recorded for this object.
bool elision_config_recorded_ = false;
DISALLOW_COPY_AND_ASSIGN(ChromeLocationBarModelDelegate);
};
......
......@@ -257,6 +257,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Omnibox.ElisionConfig" enum="OmniboxElisionConfig"
expires_after="M88">
<obsolete>
Removed 2020-10.
</obsolete>
<owner>livvielin@chromium.org</owner>
<owner>tommycli@chromium.org</owner>
<summary>
......@@ -709,6 +712,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Omnibox.ShowFullUrlsEnabled" enum="BooleanEnabled"
expires_after="M88">
<obsolete>
Removed 2020-10.
</obsolete>
<owner>livvielin@chromium.org</owner>
<owner>tommycli@chromium.org</owner>
<summary>
......
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