diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-02 07:03:29 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-02 07:03:29 +0000 |
commit | 596ce0e791506658954233c109462e64612a61b6 (patch) | |
tree | d7bdb13971a55cdec3a3546b51e4c008329ad3ef /chrome/browser/autocomplete/shortcuts_backend.cc | |
parent | a481786fc1a45a1db62596ff3b7c964430ba22fd (diff) | |
download | chromium_src-596ce0e791506658954233c109462e64612a61b6.zip chromium_src-596ce0e791506658954233c109462e64612a61b6.tar.gz chromium_src-596ce0e791506658954233c109462e64612a61b6.tar.bz2 |
Reduces dependency from AutocompleteMatch to Profile.
BUG=388510
R=hashimoto@chromium.org, blundell@chromium.org, pkasting@chromium.org
TBR=dtrainor@chromium.org
TEST=compile
Review URL: https://codereview.chromium.org/354773002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/shortcuts_backend.cc')
-rw-r--r-- | chrome/browser/autocomplete/shortcuts_backend.cc | 5 |
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( |