| Index: components/omnibox/browser/omnibox_edit_model.cc
|
| diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc
|
| index 339445352f8977fc59f60786b923bfb3268384d6..b7728894ca48df22dba144ac54f73b0eedcbeef4 100644
|
| --- a/components/omnibox/browser/omnibox_edit_model.cc
|
| +++ b/components/omnibox/browser/omnibox_edit_model.cc
|
| @@ -83,55 +83,6 @@ const char kFocusToEditTimeHistogram[] = "Omnibox.FocusToEditTime";
|
| const char kFocusToOpenTimeHistogram[] =
|
| "Omnibox.FocusToOpenTimeAnyPopupState2";
|
|
|
| -// Split the percentage match histograms into buckets based on the width of the
|
| -// omnibox.
|
| -const int kPercentageMatchHistogramWidthBuckets[] = { 400, 700, 1200 };
|
| -
|
| -void RecordPercentageMatchHistogram(const base::string16& old_text,
|
| - const base::string16& new_text,
|
| - ui::PageTransition transition,
|
| - int omnibox_width) {
|
| - size_t avg_length = (old_text.length() + new_text.length()) / 2;
|
| -
|
| - int percent = 0;
|
| - if (!old_text.empty() && !new_text.empty()) {
|
| - size_t shorter_length = std::min(old_text.length(), new_text.length());
|
| - base::string16::const_iterator end(old_text.begin() + shorter_length);
|
| - base::string16::const_iterator mismatch(
|
| - std::mismatch(old_text.begin(), end, new_text.begin()).first);
|
| - size_t matching_characters = mismatch - old_text.begin();
|
| - percent = static_cast<float>(matching_characters) / avg_length * 100;
|
| - }
|
| -
|
| - // TODO(treib,mpearson): Do we want to keep these histograms? Most of the
|
| - // previously-logged cases don't exist anymore. crbug.com/627747
|
| - std::string histogram_name;
|
| - if (ui::PageTransitionTypeIncludingQualifiersIs(
|
| - transition, ui::PAGE_TRANSITION_TYPED)) {
|
| - histogram_name = "InstantExtended.PercentageMatchV2_URLtoURL";
|
| - UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent);
|
| - } else {
|
| - histogram_name = "InstantExtended.PercentageMatchV2_URLtoQuery";
|
| - UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent);
|
| - }
|
| -
|
| - std::string suffix = "large";
|
| - for (size_t i = 0; i < arraysize(kPercentageMatchHistogramWidthBuckets);
|
| - ++i) {
|
| - if (omnibox_width < kPercentageMatchHistogramWidthBuckets[i]) {
|
| - suffix = base::IntToString(kPercentageMatchHistogramWidthBuckets[i]);
|
| - break;
|
| - }
|
| - }
|
| -
|
| - // Cannot rely on UMA histograms macro because the name of the histogram is
|
| - // generated dynamically.
|
| - base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
|
| - histogram_name + "_" + suffix, 1, 101, 102,
|
| - base::Histogram::kUmaTargetedHistogramFlag);
|
| - counter->Add(percent);
|
| -}
|
| -
|
| } // namespace
|
|
|
|
|
| @@ -754,9 +705,6 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
|
| view_->RevertAll(); // Revert the box to its unedited state.
|
| }
|
|
|
| - RecordPercentageMatchHistogram(
|
| - permanent_text_, current_text, match.transition, view_->GetWidth());
|
| -
|
| // Track whether the destination URL sends us to a search results page
|
| // using the default search provider.
|
| TemplateURLService* template_url_service = client_->GetTemplateURLService();
|
|
|