| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| index 08e40e424b4f049ddcc467407fc65343fd88b555..e8baac797c7b4d18a3cb54203464440acf5196a0 100644
|
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| @@ -686,7 +686,9 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition,
|
| match.transition = content::PAGE_TRANSITION_LINK;
|
| }
|
|
|
| - const TemplateURL* template_url = match.GetTemplateURL(profile_, false);
|
| + TemplateURLService* service =
|
| + TemplateURLServiceFactory::GetForProfile(profile_);
|
| + const TemplateURL* template_url = match.GetTemplateURL(service, false);
|
| if (template_url && template_url->url_ref().HasGoogleBaseURLs(
|
| UIThreadSearchTermsData(profile_))) {
|
| GoogleURLTracker* tracker =
|
| @@ -783,7 +785,9 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
|
| << "An omnibox focus should have occurred before opening a match.";
|
| UMA_HISTOGRAM_TIMES(kFocusToOpenTimeHistogram, now - last_omnibox_focus_);
|
|
|
| - TemplateURL* template_url = match.GetTemplateURL(profile_, false);
|
| + TemplateURLService* service =
|
| + TemplateURLServiceFactory::GetForProfile(profile_);
|
| + TemplateURL* template_url = match.GetTemplateURL(service, false);
|
| if (template_url) {
|
| if (match.transition == content::PAGE_TRANSITION_KEYWORD) {
|
| // The user is using a non-substituting keyword or is explicitly in
|
| @@ -1264,7 +1268,9 @@ void OmniboxEditModel::OnCurrentMatchChanged() {
|
| // OnPopupDataChanged use their previous state to detect changes.
|
| base::string16 keyword;
|
| bool is_keyword_hint;
|
| - match.GetKeywordUIState(profile_, &keyword, &is_keyword_hint);
|
| + TemplateURLService* service =
|
| + TemplateURLServiceFactory::GetForProfile(profile_);
|
| + match.GetKeywordUIState(service, &keyword, &is_keyword_hint);
|
| if (popup_model())
|
| popup_model()->OnResultChanged();
|
| // OnPopupDataChanged() resets OmniboxController's |current_match_| early
|
|
|