Index: components/omnibox/browser/clipboard_url_provider.cc |
diff --git a/components/omnibox/browser/clipboard_url_provider.cc b/components/omnibox/browser/clipboard_url_provider.cc |
index 27babb71d130dcf80aef7b851c515011c36b5d78..ad24205047f98721544180d8cc7443ee79cbafdf 100644 |
--- a/components/omnibox/browser/clipboard_url_provider.cc |
+++ b/components/omnibox/browser/clipboard_url_provider.cc |
@@ -4,6 +4,7 @@ |
#include "components/omnibox/browser/clipboard_url_provider.h" |
+#include "base/feature_list.h" |
#include "base/logging.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -47,8 +48,13 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input, |
// If the omnibox is not empty, add a default match. |
// This match will be opened when the user presses "Enter". |
if (!input.text().empty()) { |
- AutocompleteMatch verbatim_match = VerbatimMatchForURL( |
- client_, input, input.current_url(), history_url_provider_, -1); |
+ const base::string16 description = |
+ (base::FeatureList::IsEnabled(omnibox::kDisplayTitleForCurrentUrl)) |
+ ? input.current_title() |
+ : base::string16(); |
+ AutocompleteMatch verbatim_match = |
+ VerbatimMatchForURL(client_, input, input.current_url(), description, |
+ history_url_provider_, -1); |
matches_.push_back(verbatim_match); |
} |
UMA_HISTOGRAM_BOOLEAN("Omnibox.ClipboardSuggestionShownWithCurrentURL", |