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

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

Issue 2124563002: Don't try to create a verbatim match with an empty input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 5 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 c74cf1e833e2e34242684793cea6c083b34e9785..e4efcf7893472b670801012145185bc5497ce90c 100644
--- a/components/omnibox/browser/verbatim_match.cc
+++ b/components/omnibox/browser/verbatim_match.cc
@@ -4,6 +4,7 @@
#include "components/omnibox/browser/verbatim_match.h"
+#include "base/logging.h"
#include "components/omnibox/browser/autocomplete_classifier.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_provider_client.h"
@@ -17,6 +18,7 @@ AutocompleteMatch VerbatimMatchForURL(
const GURL& destination_url,
HistoryURLProvider* history_url_provider,
int verbatim_relevance) {
+ DCHECK(!input.text().empty());
Peter Kasting 2016/07/18 22:16:15 How hard would it be to just be robust against thi
AutocompleteMatch match;
// If query-in-the-omnibox is not enabled (and thus the verbatim match for
// a URL is guaranteed to be a URL) and the caller already knows where the

Powered by Google App Engine
This is Rietveld 408576698