summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/shortcuts_backend.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/shortcuts_backend.cc')
-rw-r--r--chrome/browser/autocomplete/shortcuts_backend.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/shortcuts_backend.cc b/chrome/browser/autocomplete/shortcuts_backend.cc
index 71254aa..fd0916c 100644
--- a/chrome/browser/autocomplete/shortcuts_backend.cc
+++ b/chrome/browser/autocomplete/shortcuts_backend.cc
@@ -22,6 +22,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(