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

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

Issue 2046263002: Fix DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Created 4 years, 6 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/omnibox_edit_model.cc
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc
index cc1e27a5f83c30743cb991ecebff863a76d0a855..76b03a757d7f9ec27978c0719d5fb8098a79ce99 100644
--- a/components/omnibox/browser/omnibox_edit_model.cc
+++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -650,7 +650,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
input_text, match,
autocomplete_controller()->history_url_provider()->SuggestExactInput(
alternate_input, alternate_nav_url,
- AutocompleteInput::HasHTTPScheme(input_text))));
+ !AutocompleteInput::HasHTTPScheme(input_text))));
base::TimeDelta elapsed_time_since_last_change_to_default_match(
now - autocomplete_controller()->last_time_default_match_changed());
@@ -759,9 +759,10 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
// Track whether the destination URL sends us to a search results page
// using the default search provider.
- if (client_->GetTemplateURLService()
- ->IsSearchResultsPageFromDefaultSearchProvider(
- match.destination_url)) {
+ TemplateURLService* template_url_service = client_->GetTemplateURLService();
Peter Kasting 2016/06/08 01:21:34 Another change to avoid segfaulting in test code.
+ if (template_url_service &&
+ template_url_service->IsSearchResultsPageFromDefaultSearchProvider(
+ match.destination_url)) {
base::RecordAction(
base::UserMetricsAction("OmniboxDestinationURLIsSearchOnDSP"));
}

Powered by Google App Engine
This is Rietveld 408576698