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..3fe1074966161124158d27f699cfd3e4a9a5e553 100644 |
--- a/components/omnibox/browser/clipboard_url_provider.cc |
+++ b/components/omnibox/browser/clipboard_url_provider.cc |
@@ -4,11 +4,13 @@ |
#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" |
#include "components/omnibox/browser/autocomplete_input.h" |
#include "components/omnibox/browser/autocomplete_provider_client.h" |
+#include "components/omnibox/browser/omnibox_field_trial.h" |
#include "components/omnibox/browser/verbatim_match.h" |
#include "components/open_from_clipboard/clipboard_recent_content.h" |
#include "components/strings/grit/components_strings.h" |
@@ -47,8 +49,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", |