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

Unified Diff: components/omnibox/browser/zero_suggest_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/zero_suggest_provider.cc
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index 8a7dcf7afcf5239cf824172ec1e49e685a8f91d0..a2bf346563cca096984482162b4b76de538b1d2b 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -114,9 +114,9 @@ void ZeroSuggestProvider::Start(const AutocompleteInput& input,
results_from_cache_ = false;
permanent_text_ = input.text();
current_query_ = input.current_url().spec();
+ current_title_ = input.current_title();
current_page_classification_ = input.current_page_classification();
current_url_match_ = MatchForCurrentURL();
-
std::string url_string = GetContextualSuggestionsUrl();
Mark P 2017/04/12 05:07:56 nit: Please restore the blank line you deleted her
gcomanici 2017/04/12 16:16:31 Done.
GURL suggest_url(url_string);
if (!suggest_url.is_valid())
@@ -263,7 +263,7 @@ const AutocompleteInput ZeroSuggestProvider::GetInput(bool is_keyword) const {
// The callers of this method won't look at the AutocompleteInput's
// |from_omnibox_focus| member, so we can set its value to false.
return AutocompleteInput(base::string16(), base::string16::npos,
- std::string(), GURL(current_query_),
+ std::string(), GURL(current_query_), current_title_,
current_page_classification_, true, false, false,
true, false, client()->GetSchemeClassifier());
}

Powered by Google App Engine
This is Rietveld 408576698