Index: chrome/browser/autocomplete/shortcuts_backend.cc |
diff --git a/chrome/browser/autocomplete/shortcuts_backend.cc b/chrome/browser/autocomplete/shortcuts_backend.cc |
index 3dc95a6aab5d7f22f15a8496099c9d0425a6f68c..34dc161602fdd0d1fbbeba07259c0dd852630945 100644 |
--- a/chrome/browser/autocomplete/shortcuts_backend.cc |
+++ b/chrome/browser/autocomplete/shortcuts_backend.cc |
@@ -23,6 +23,7 @@ |
#include "chrome/browser/history/shortcuts_database.h" |
#include "chrome/browser/omnibox/omnibox_log.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/search_engines/template_url_service_factory.h" |
#include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
#include "chrome/common/autocomplete_match_type.h" |
#include "chrome/common/chrome_constants.h" |
@@ -143,12 +144,14 @@ history::ShortcutsDatabase::Shortcut::MatchCore |
ShortcutsBackend::MatchToMatchCore(const AutocompleteMatch& match, |
Profile* profile) { |
const AutocompleteMatch::Type match_type = GetTypeForShortcut(match.type); |
+ TemplateURLService* service = |
+ TemplateURLServiceFactory::GetForProfile(profile); |
const AutocompleteMatch& normalized_match = |
AutocompleteMatch::IsSpecializedSearchType(match.type) ? |
BaseSearchProvider::CreateSearchSuggestion( |
match.search_terms_args->search_terms, match_type, |
(match.transition == content::PAGE_TRANSITION_KEYWORD), |
- match.GetTemplateURL(profile, false), |
+ match.GetTemplateURL(service, false), |
UIThreadSearchTermsData(profile)) : |
match; |
return history::ShortcutsDatabase::Shortcut::MatchCore( |