Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Unified Diff: components/omnibox/browser/history_url_provider.cc

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Change the place where the title is added and some suggested renaming. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/browser/history_url_provider.cc
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
index b65ee725e3a72ce6b9b2fed8625a470c0a645cd0..f57fd7ab055df38c799b83ed7fa022f072e8a9e3 100644
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
@@ -616,7 +617,12 @@ AutocompleteMatch HistoryURLProvider::SuggestExactInput(
&match.contents_class);
}
}
-
+ if (base::FeatureList::IsEnabled(omnibox::kDisplayTitleForCurrentUrl)) {
Mark P 2017/04/12 05:07:56 I don't this this is right. SuggestExactInput can
gcomanici 2017/04/12 16:16:30 Done.
+ match.description = input.current_title();
+ AutocompleteMatch::ClassifyLocationInString(
+ base::string16::npos, 0, match.description.length(),
+ ACMatchClassification::NONE, &match.description_class);
+ }
return match;
}

Powered by Google App Engine
This is Rietveld 408576698