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

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: Simplify behavior 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 487f4389718274c3cf888e4f79ff245eb13d98b9..054b8dfeaf13fea0bdda0ed2c1289ce8d96fe664 100644
--- a/components/omnibox/browser/omnibox_edit_model.cc
+++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -669,8 +669,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
client_->CreateOmniboxNavigationObserver(
input_text, match,
autocomplete_controller()->history_url_provider()->SuggestExactInput(
- alternate_input, alternate_nav_url,
- AutocompleteInput::HasHTTPScheme(input_text))));
+ alternate_input, alternate_nav_url, false)));
base::TimeDelta elapsed_time_since_last_change_to_default_match(
now - autocomplete_controller()->last_time_default_match_changed());
@@ -779,9 +778,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();
+ if (template_url_service &&
+ template_url_service->IsSearchResultsPageFromDefaultSearchProvider(
+ match.destination_url)) {
base::RecordAction(
base::UserMetricsAction("OmniboxDestinationURLIsSearchOnDSP"));
}
« no previous file with comments | « components/omnibox/browser/omnibox_controller.cc ('k') | components/omnibox/browser/omnibox_edit_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698