Fix URL formatting in Verbatim Match suggestion.
This change updates the formatting used for URL in
verbatim match suggestion. The change also replaces
full synchronous classify pass on current website with
simple history lookup (since the user is already on
that page).
Bug: 955827
Change-Id: Ib26dd442d5173f27ac6b6fac2f1432e099031a5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2718388
Commit-Queue: Tomasz Wiszkowski <[email protected]>
Reviewed-by: Justin Donnelly <[email protected]>
Reviewed-by: Filip Gorski <[email protected]>
Cr-Commit-Position: refs/heads/master@{#861716}
diff --git a/components/omnibox/browser/autocomplete_provider.h b/components/omnibox/browser/autocomplete_provider.h
index feb3d15..e08940cd 100644
--- a/components/omnibox/browser/autocomplete_provider.h
+++ b/components/omnibox/browser/autocomplete_provider.h
@@ -315,6 +315,13 @@
static bool IsExplicitlyInKeywordMode(const AutocompleteInput& input,
const base::string16& keyword);
+ // Trims "http:" or "https:" and up to two subsequent slashes from |url|. If
+ // |trim_https| is true, trims "https:", otherwise trims "http:". Returns the
+ // number of characters that were trimmed.
+ // NOTE: For a view-source: URL, this will trim from after "view-source:" and
+ // return 0.
+ static size_t TrimSchemePrefix(base::string16* url, bool trim_https);
+
protected:
friend class base::RefCountedThreadSafe<AutocompleteProvider>;
FRIEND_TEST_ALL_PREFIXES(BookmarkProviderTest, InlineAutocompletion);
@@ -341,13 +348,6 @@
// string unconditionally.
static FixupReturn FixupUserInput(const AutocompleteInput& input);
- // Trims "http:" or "https:" and up to two subsequent slashes from |url|. If
- // |trim_https| is true, trims "https:", otherwise trims "http:". Returns the
- // number of characters that were trimmed.
- // NOTE: For a view-source: URL, this will trim from after "view-source:" and
- // return 0.
- static size_t TrimSchemePrefix(base::string16* url, bool trim_https);
-
const size_t provider_max_matches_;
ACMatches matches_;
diff --git a/components/omnibox/browser/clipboard_provider.cc b/components/omnibox/browser/clipboard_provider.cc
index c912ee14..0078dab 100644
--- a/components/omnibox/browser/clipboard_provider.cc
+++ b/components/omnibox/browser/clipboard_provider.cc
@@ -254,9 +254,8 @@
(base::FeatureList::IsEnabled(omnibox::kDisplayTitleForCurrentUrl))
? input.current_title()
: base::string16();
- AutocompleteMatch verbatim_match =
- VerbatimMatchForURL(client_, input, input.current_url(), description,
- history_url_provider_, -1);
+ AutocompleteMatch verbatim_match = VerbatimMatchForURL(
+ this, client_, input, input.current_url(), description, -1);
matches_.push_back(verbatim_match);
}
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
index e49f886e..f920624 100644
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -35,6 +35,7 @@
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/browser/url_index_private_data.h"
#include "components/omnibox/browser/url_prefix.h"
+#include "components/omnibox/browser/verbatim_match.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/omnibox_focus_type.h"
@@ -526,8 +527,9 @@
// Create a match for what the user typed.
const bool trim_http = !AutocompleteInput::HasHTTPScheme(input.text());
- AutocompleteMatch what_you_typed_match(SuggestExactInput(
- fixed_up_input, fixed_up_input.canonicalized_url(), trim_http));
+ AutocompleteMatch what_you_typed_match(
+ VerbatimMatchForInput(this, client(), fixed_up_input,
+ fixed_up_input.canonicalized_url(), trim_http));
// If the input fix-up above added characters, show them as an
// autocompletion, unless directed not to.
@@ -621,76 +623,6 @@
return res;
}
-AutocompleteMatch HistoryURLProvider::SuggestExactInput(
- const AutocompleteInput& input,
- const GURL& destination_url,
- bool trim_default_scheme) {
- // The FormattedStringWithEquivalentMeaning() call below requires callers to
- // be on the main thread.
- DCHECK(thread_checker_.CalledOnValidThread());
-
- AutocompleteMatch match(this, 0, false,
- AutocompleteMatchType::URL_WHAT_YOU_TYPED);
-
- if (destination_url.is_valid()) {
- match.destination_url = destination_url;
- // If the input explicitly contains "http://" or "https://", callers must
- // set |trim_default_scheme| to false. Otherwise, |trim_default_scheme| may
- // be either true or false.
- if (input.added_default_scheme_to_typed_url()) {
- DCHECK(!(trim_default_scheme &&
- AutocompleteInput::HasHTTPSScheme(input.text())));
- } else {
- DCHECK(!(trim_default_scheme &&
- AutocompleteInput::HasHTTPScheme(input.text())));
- }
- const url_formatter::FormatUrlType format_type =
- input.added_default_scheme_to_typed_url()
- ? url_formatter::kFormatUrlOmitHTTPS
- : url_formatter::kFormatUrlOmitHTTP;
-
- base::string16 display_string(url_formatter::FormatUrl(
- destination_url, url_formatter::kFormatUrlOmitDefaults & ~format_type,
- net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
- if (trim_default_scheme) {
- TrimSchemePrefix(&display_string,
- input.added_default_scheme_to_typed_url());
- }
-
- match.fill_into_edit =
- AutocompleteInput::FormattedStringWithEquivalentMeaning(
- destination_url, display_string, client()->GetSchemeClassifier(),
- nullptr);
- // The what-you-typed match is generally only allowed to be default for
- // URL inputs or when there is no default search provider. (It's also
- // allowed to be default for UNKNOWN inputs where the destination is a known
- // intranet site. In this case, |allowed_to_be_default_match| is revised in
- // FixupExactSuggestion().)
- const bool has_default_search_provider =
- client()->GetTemplateURLService() &&
- client()->GetTemplateURLService()->GetDefaultSearchProvider();
- match.allowed_to_be_default_match =
- (input.type() == metrics::OmniboxInputType::URL) ||
- !has_default_search_provider;
- // NOTE: Don't set match.inline_autocompletion to something non-empty here;
- // it's surprising and annoying.
-
- // Try to highlight "innermost" match location. If we fix up "w" into
- // "www.w.com", we want to highlight the fifth character, not the first.
- // This relies on match.destination_url being the non-prefix-trimmed version
- // of match.contents.
- match.contents = display_string;
-
- TermMatches termMatches = {{0, 0, input.text().length()}};
- match.contents_class = ClassifyTermMatches(
- termMatches, match.contents.size(),
- ACMatchClassification::MATCH | ACMatchClassification::URL,
- ACMatchClassification::URL);
- }
-
- return match;
-}
-
void HistoryURLProvider::ExecuteWithDB(HistoryURLProviderParams* params,
history::HistoryBackend* backend,
history::URLDatabase* db) {
@@ -828,7 +760,7 @@
// Check whether what the user typed appears in history.
const bool can_check_history_for_exact_match =
// Checking what_you_typed_match.destination_url.is_valid() tells us
- // whether SuggestExactInput() succeeded in constructing a valid match.
+ // whether VerbatimMatchForInput succeeded in constructing a valid match.
params->what_you_typed_match.destination_url.is_valid() &&
// Additionally, in the case where the user has typed "foo.com" and
// visited (but not typed) "foo/", and the input is "foo", the first pass
diff --git a/components/omnibox/browser/history_url_provider.h b/components/omnibox/browser/history_url_provider.h
index 2bb9f35..8f63cfce 100644
--- a/components/omnibox/browser/history_url_provider.h
+++ b/components/omnibox/browser/history_url_provider.h
@@ -43,7 +43,7 @@
// ----------- --------------
// AutocompleteController::Start
// -> HistoryURLProvider::Start
-// -> SuggestExactInput
+// -> VerbatimMatchForInput
// [params_ allocated]
// -> DoAutocomplete (for inline autocomplete)
// -> URLDatabase::AutocompleteForPrefix (on in-memory DB)
@@ -208,19 +208,6 @@
// See base/trace_event/memory_usage_estimator.h for more info.
size_t EstimateMemoryUsage() const override;
- // Returns a match representing a navigation to |destination_url|, highlighted
- // appropriately against |input|. |trim_default_scheme| controls whether the
- // match's |fill_into_edit| and |contents| should have the scheme (http or
- // https only) stripped off, and should not be set to true if the user's
- // original input contains the scheme. The default scheme is https if |input|
- // is upgraded to https, otherwise it's http.
- // NOTES: This does not set the relevance of the returned match, as different
- // callers want different behavior. Callers must set this manually.
- // This function should only be called on the UI thread.
- AutocompleteMatch SuggestExactInput(const AutocompleteInput& input,
- const GURL& destination_url,
- bool trim_default_scheme);
-
// Runs the history query on the history thread, called by the history
// system. The history database MAY BE NULL in which case it is not
// available and we should return no data. Also schedules returning the
diff --git a/components/omnibox/browser/history_url_provider_unittest.cc b/components/omnibox/browser/history_url_provider_unittest.cc
index b7bb1c6..e3a74b8 100644
--- a/components/omnibox/browser/history_url_provider_unittest.cc
+++ b/components/omnibox/browser/history_url_provider_unittest.cc
@@ -30,6 +30,7 @@
#include "components/omnibox/browser/autocomplete_result.h"
#include "components/omnibox/browser/fake_autocomplete_provider_client.h"
#include "components/omnibox/browser/history_quick_provider.h"
+#include "components/omnibox/browser/verbatim_match.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/default_search_manager.h"
@@ -1150,8 +1151,9 @@
metrics::OmniboxEventProto::BLANK,
TestSchemeClassifier());
input.set_current_url(GURL("about:blank"));
- AutocompleteMatch match(autocomplete_->SuggestExactInput(
- input, input.canonicalized_url(), test_cases[i].trim_http));
+ AutocompleteMatch match(VerbatimMatchForInput(
+ autocomplete_.get(), client_.get(), input, input.canonicalized_url(),
+ test_cases[i].trim_http));
EXPECT_EQ(ASCIIToUTF16(test_cases[i].contents), match.contents);
for (size_t match_index = 0; match_index < match.contents_class.size();
++match_index) {
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc
index c16138a..93cba7f 100644
--- a/components/omnibox/browser/omnibox_edit_model.cc
+++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -43,6 +43,7 @@
#include "components/omnibox/browser/omnibox_view.h"
#include "components/omnibox/browser/search_provider.h"
#include "components/omnibox/browser/suggestion_answer.h"
+#include "components/omnibox/browser/verbatim_match.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/search_engines/omnibox_focus_type.h"
#include "components/search_engines/template_url.h"
@@ -622,9 +623,10 @@
input.set_want_asynchronous_matches(input_.want_asynchronous_matches());
input.set_focus_type(input_.focus_type());
input_ = input;
- AutocompleteMatch url_match(
- autocomplete_controller()->history_url_provider()->SuggestExactInput(
- input_, input_.canonicalized_url(), false));
+ AutocompleteMatch url_match(VerbatimMatchForInput(
+ autocomplete_controller()->history_url_provider(),
+ autocomplete_controller()->autocomplete_provider_client(), input_,
+ input_.canonicalized_url(), false));
if (url_match.destination_url.is_valid()) {
// We have a valid URL, we use this newly generated AutocompleteMatch.
@@ -758,7 +760,7 @@
base::string16 input_text(pasted_text);
if (input_text.empty())
input_text = user_input_in_progress_ ? user_text_ : url_for_editing_;
- // Create a dummy AutocompleteInput for use in calling SuggestExactInput()
+ // Create a dummy AutocompleteInput for use in calling VerbatimMatchForInput()
// to create an alternate navigational match.
AutocompleteInput alternate_input(
input_text, GetPageClassification(), client_->GetSchemeClassifier(),
@@ -771,7 +773,9 @@
std::unique_ptr<OmniboxNavigationObserver> observer(
client_->CreateOmniboxNavigationObserver(
input_text, match,
- autocomplete_controller()->history_url_provider()->SuggestExactInput(
+ VerbatimMatchForInput(
+ autocomplete_controller()->history_url_provider(),
+ autocomplete_controller()->autocomplete_provider_client(),
alternate_input, alternate_nav_url, false)));
base::TimeDelta elapsed_time_since_last_change_to_default_match(
diff --git a/components/omnibox/browser/verbatim_match.cc b/components/omnibox/browser/verbatim_match.cc
index 3ddef34f..d0a4a3cd 100644
--- a/components/omnibox/browser/verbatim_match.cc
+++ b/components/omnibox/browser/verbatim_match.cc
@@ -6,28 +6,29 @@
#include "components/omnibox/browser/autocomplete_classifier.h"
#include "components/omnibox/browser/autocomplete_input.h"
+#include "components/omnibox/browser/autocomplete_match_classification.h"
+#include "components/omnibox/browser/autocomplete_provider.h"
#include "components/omnibox/browser/autocomplete_provider_client.h"
-#include "components/omnibox/browser/history_url_provider.h"
+#include "components/omnibox/browser/in_memory_url_index_types.h"
+#include "components/search_engines/template_url_service.h"
#include "url/gurl.h"
AutocompleteMatch VerbatimMatchForURL(
+ AutocompleteProvider* provider,
AutocompleteProviderClient* client,
const AutocompleteInput& input,
const GURL& destination_url,
const base::string16& destination_description,
- HistoryURLProvider* history_url_provider,
int verbatim_relevance) {
AutocompleteMatch match;
- // If the caller already knows where the verbatim match should go and has
- // provided a HistoryURLProvider to aid in its construction, construct the
- // match directly, don't call Classify() on the input. Classify() runs all
- // providers' synchronous passes. Some providers such as HistoryQuick can
- // have a slow synchronous pass on some inputs.
- if (history_url_provider && destination_url.is_valid()) {
- match = history_url_provider->SuggestExactInput(
- input,
- destination_url,
- !AutocompleteInput::HasHTTPScheme(input.text()));
+ // If the caller is a provider and already knows where the verbatim match
+ // should go, construct the match directly, don't call Classify() on the
+ // input. Classify() runs all providers' synchronous passes. Some providers
+ // such as HistoryQuick can have a slow synchronous pass on some inputs.
+ if (provider != nullptr && destination_url.is_valid()) {
+ match =
+ VerbatimMatchForInput(provider, client, input, destination_url,
+ !AutocompleteInput::HasHTTPScheme(input.text()));
match.description = destination_description;
if (!match.description.empty())
match.description_class.push_back({0, ACMatchClassification::NONE});
@@ -43,3 +44,69 @@
verbatim_relevance >= 0 ? verbatim_relevance : kDefaultVerbatimRelevance;
return match;
}
+
+AutocompleteMatch VerbatimMatchForInput(AutocompleteProvider* provider,
+ AutocompleteProviderClient* client,
+ const AutocompleteInput& input,
+ const GURL& destination_url,
+ bool trim_default_scheme) {
+ AutocompleteMatch match(provider, 0, false,
+ AutocompleteMatchType::URL_WHAT_YOU_TYPED);
+
+ if (destination_url.is_valid()) {
+ match.destination_url = destination_url;
+ // If the input explicitly contains "http://" or "https://", callers must
+ // set |trim_default_scheme| to false. Otherwise, |trim_default_scheme| may
+ // be either true or false.
+ if (input.added_default_scheme_to_typed_url()) {
+ DCHECK(!(trim_default_scheme &&
+ AutocompleteInput::HasHTTPSScheme(input.text())));
+ } else {
+ DCHECK(!(trim_default_scheme &&
+ AutocompleteInput::HasHTTPScheme(input.text())));
+ }
+ const url_formatter::FormatUrlType format_type =
+ input.added_default_scheme_to_typed_url()
+ ? url_formatter::kFormatUrlOmitHTTPS
+ : url_formatter::kFormatUrlOmitHTTP;
+
+ base::string16 display_string(url_formatter::FormatUrl(
+ destination_url, url_formatter::kFormatUrlOmitDefaults & ~format_type,
+ net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
+ if (trim_default_scheme) {
+ AutocompleteProvider::TrimSchemePrefix(
+ &display_string, input.added_default_scheme_to_typed_url());
+ }
+ match.fill_into_edit =
+ AutocompleteInput::FormattedStringWithEquivalentMeaning(
+ destination_url, display_string, client->GetSchemeClassifier(),
+ nullptr);
+ // The what-you-typed match is generally only allowed to be default for
+ // URL inputs or when there is no default search provider. (It's also
+ // allowed to be default for UNKNOWN inputs where the destination is a known
+ // intranet site. In this case, |allowed_to_be_default_match| is revised in
+ // FixupExactSuggestion().)
+ const bool has_default_search_provider =
+ client->GetTemplateURLService() &&
+ client->GetTemplateURLService()->GetDefaultSearchProvider();
+ match.allowed_to_be_default_match =
+ (input.type() == metrics::OmniboxInputType::URL) ||
+ !has_default_search_provider;
+ // NOTE: Don't set match.inline_autocompletion to something non-empty here;
+ // it's surprising and annoying.
+
+ // Try to highlight "innermost" match location. If we fix up "w" into
+ // "www.w.com", we want to highlight the fifth character, not the first.
+ // This relies on match.destination_url being the non-prefix-trimmed version
+ // of match.contents.
+ match.contents = display_string;
+
+ TermMatches termMatches = {{0, 0, input.text().length()}};
+ match.contents_class = ClassifyTermMatches(
+ termMatches, match.contents.size(),
+ ACMatchClassification::MATCH | ACMatchClassification::URL,
+ ACMatchClassification::URL);
+ }
+
+ return match;
+}
diff --git a/components/omnibox/browser/verbatim_match.h b/components/omnibox/browser/verbatim_match.h
index cc5354d..d5f77be 100644
--- a/components/omnibox/browser/verbatim_match.h
+++ b/components/omnibox/browser/verbatim_match.h
@@ -10,8 +10,8 @@
#include "url/gurl.h"
struct AutocompleteMatch;
+class AutocompleteProvider;
class AutocompleteProviderClient;
-class HistoryURLProvider;
// Returns a verbatim match for input.text() with a relevance of
// |verbatim_relevance|. If |verbatim_relevance| is negative then a default
@@ -21,11 +21,26 @@
// implementation for details) than the default code path.
// input.text() must not be empty.
AutocompleteMatch VerbatimMatchForURL(
+ AutocompleteProvider* provider,
AutocompleteProviderClient* client,
const AutocompleteInput& input,
const GURL& destination_url,
const base::string16& destination_description,
- HistoryURLProvider* history_url_provider,
int verbatim_relevance);
+// Returns a match representing a navigation to |destination_url|, highlighted
+// appropriately against |input|. |trim_default_scheme| controls whether the
+// match's |fill_into_edit| and |contents| should have the scheme (http or
+// https only) stripped off, and should not be set to true if the user's
+// original input contains the scheme. The default scheme is https if |input|
+// is upgraded to https, otherwise it's http.
+// NOTES: This does not set the relevance of the returned match, as different
+// callers want different behavior. Callers must set this manually.
+// This function should only be called on the UI thread.
+AutocompleteMatch VerbatimMatchForInput(AutocompleteProvider* provider,
+ AutocompleteProviderClient* client,
+ const AutocompleteInput& input,
+ const GURL& destination_url,
+ bool trim_http);
+
#endif // COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index fa6e734a..65f5787 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -457,9 +457,9 @@
// We pass a nullptr as the |history_url_provider| parameter now to force
// VerbatimMatch to do a classification, since the text can be a search query.
// TODO(tommycli): Simplify this - probably just bypass VerbatimMatchForURL.
- AutocompleteMatch match = VerbatimMatchForURL(
- client(), tmp, GURL(current_query_), description,
- /*history_url_provider=*/nullptr, results_.verbatim_relevance);
+ AutocompleteMatch match =
+ VerbatimMatchForURL(this, client(), tmp, GURL(current_query_),
+ description, results_.verbatim_relevance);
match.provider = this;
return match;
}
diff --git a/components/omnibox/browser/zero_suggest_verbatim_match_provider.cc b/components/omnibox/browser/zero_suggest_verbatim_match_provider.cc
index fb58fe5..04d2e86 100644
--- a/components/omnibox/browser/zero_suggest_verbatim_match_provider.cc
+++ b/components/omnibox/browser/zero_suggest_verbatim_match_provider.cc
@@ -9,6 +9,8 @@
#include "components/omnibox/browser/autocomplete_provider_listener.h"
#include "components/omnibox/browser/verbatim_match.h"
#include "components/omnibox/common/omnibox_features.h"
+#include "components/url_formatter/url_formatter.h"
+#include "net/base/escape.h"
namespace {
// The relevance score for verbatim match.
@@ -51,7 +53,8 @@
// Only offer verbatim match after the user just focused the Omnibox,
// or if the input field is empty.
- if (input.focus_type() == OmniboxFocusType::DEFAULT)
+ if (input.focus_type() == OmniboxFocusType::DEFAULT ||
+ input.focus_type() == OmniboxFocusType::DELETED_PERMANENT_TEXT)
return;
// For consistency with other zero-prefix providers.
@@ -70,9 +73,14 @@
verbatim_input.set_prevent_inline_autocomplete(true);
verbatim_input.set_allow_exact_keyword_match(false);
- AutocompleteMatch match = VerbatimMatchForURL(
- client_, verbatim_input, page_url, input.current_title(), nullptr,
- kVerbatimMatchRelevanceScore);
+ AutocompleteMatch match =
+ VerbatimMatchForURL(this, client_, verbatim_input, page_url,
+ input.current_title(), kVerbatimMatchRelevanceScore);
+ // Make sure the URL is formatted the same was as most visited sites.
+ auto format_types = AutocompleteMatch::GetFormatTypes(false, false);
+ match.contents = url_formatter::FormatUrl(page_url, format_types,
+ net::UnescapeRule::SPACES, nullptr,
+ nullptr, nullptr);
// In the case of native pages, the classifier may replace the URL with an
// empty content, resulting with a verbatim match that does not point
diff --git a/components/omnibox/browser/zero_suggest_verbatim_match_provider.h b/components/omnibox/browser/zero_suggest_verbatim_match_provider.h
index 34f2708..f5d91d0 100644
--- a/components/omnibox/browser/zero_suggest_verbatim_match_provider.h
+++ b/components/omnibox/browser/zero_suggest_verbatim_match_provider.h
@@ -6,6 +6,7 @@
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_provider.h"
+#include "components/omnibox/browser/history_url_provider.h"
class AutocompleteProviderClient;
diff --git a/components/omnibox/browser/zero_suggest_verbatim_match_provider_unittest.cc b/components/omnibox/browser/zero_suggest_verbatim_match_provider_unittest.cc
index b7c9957..4b055e9 100644
--- a/components/omnibox/browser/zero_suggest_verbatim_match_provider_unittest.cc
+++ b/components/omnibox/browser/zero_suggest_verbatim_match_provider_unittest.cc
@@ -11,6 +11,8 @@
#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/task_environment.h"
+#include "components/omnibox/browser/fake_autocomplete_provider_client.h"
#include "components/omnibox/browser/mock_autocomplete_provider_client.h"
#include "components/omnibox/browser/test_scheme_classifier.h"
#include "components/omnibox/common/omnibox_features.h"
@@ -27,8 +29,10 @@
protected:
bool IsVerbatimMatchEligible() const;
+ base::test::TaskEnvironment task_environment_{
+ base::test::TaskEnvironment::MainThreadType::UI};
scoped_refptr<ZeroSuggestVerbatimMatchProvider> provider_;
- MockAutocompleteProviderClient mock_client_;
+ FakeAutocompleteProviderClient mock_client_;
};
bool ZeroSuggestVerbatimMatchProviderTest::IsVerbatimMatchEligible() const {