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

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

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Added description as a param to VerbatimMatchForURL 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/verbatim_match.cc
diff --git a/components/omnibox/browser/verbatim_match.cc b/components/omnibox/browser/verbatim_match.cc
index 381ba3d2ffa7b7bdbdee3e63dfc3a7fb3d1aa149..1a70f43a585ab2d29c8ef5911fafafcf0f119e2f 100644
--- a/components/omnibox/browser/verbatim_match.cc
+++ b/components/omnibox/browser/verbatim_match.cc
@@ -9,12 +9,14 @@
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_provider_client.h"
#include "components/omnibox/browser/history_url_provider.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
Mark P 2017/04/13 21:12:28 nit: unnecessary
gcomanici 2017/04/18 18:52:52 Removed.
#include "url/gurl.h"
AutocompleteMatch VerbatimMatchForURL(
AutocompleteProviderClient* client,
const AutocompleteInput& input,
const GURL& destination_url,
+ const base::string16& destination_description,
HistoryURLProvider* history_url_provider,
int verbatim_relevance) {
DCHECK(!input.text().empty());
@@ -39,5 +41,9 @@ AutocompleteMatch VerbatimMatchForURL(
const int kDefaultVerbatimRelevance = 1300;
match.relevance =
verbatim_relevance >= 0 ? verbatim_relevance : kDefaultVerbatimRelevance;
+ match.description = destination_description;
Mark P 2017/04/13 21:12:28 This block should go in the if statement, just aft
gcomanici 2017/04/18 18:52:52 Done.
+ 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