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

Unified Diff: components/omnibox/browser/physical_web_provider.h

Issue 2266083002: Avoid DCHECK failure for chrome:// URLs in autocomplete suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: assert no default match Created 4 years, 4 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/physical_web_provider.h
diff --git a/components/omnibox/browser/physical_web_provider.h b/components/omnibox/browser/physical_web_provider.h
index 86c1f5cba50ecad2d40fd464691bcdbf56112b60..be3c2171f9ff45dfa59c0de1777d0f70f25541f1 100644
--- a/components/omnibox/browser/physical_web_provider.h
+++ b/components/omnibox/browser/physical_web_provider.h
@@ -16,14 +16,16 @@ class ListValue;
class PhysicalWebProvider : public AutocompleteProvider {
public:
- static PhysicalWebProvider* Create(AutocompleteProviderClient* client);
+ static PhysicalWebProvider* Create(AutocompleteProviderClient* client,
+ HistoryURLProvider* history_url_provider);
// AutocompleteProvider:
void Start(const AutocompleteInput& input, bool minimal_changes) override;
void Stop(bool clear_cached_results, bool due_to_user_inactivity) override;
private:
- PhysicalWebProvider(AutocompleteProviderClient* client);
+ PhysicalWebProvider(AutocompleteProviderClient* client,
+ HistoryURLProvider* history_url_provider);
~PhysicalWebProvider() override;
// Adds a separate match item to |matches_| for each nearby URL in
@@ -39,6 +41,9 @@ private:
void AppendOverflowItem(int additional_url_count, int relevance);
AutocompleteProviderClient* client_;
+
+ // Used for efficiency when creating the verbatim match. Can be NULL.
+ HistoryURLProvider* history_url_provider_;
};
#endif // COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_
« no previous file with comments | « components/omnibox/browser/clipboard_url_provider.cc ('k') | components/omnibox/browser/physical_web_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698