Index: chrome/browser/instant/instant_controller.cc |
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
index 61cedf05173c6050b4d0b23ccb610341f7c7cf80..c7a66533230a99f0cdc572472d4adf82c9a77167 100644 |
--- a/chrome/browser/instant/instant_controller.cc |
+++ b/chrome/browser/instant/instant_controller.cc |
@@ -678,7 +678,7 @@ void InstantController::UpdateLoader(const TemplateURL* template_url, |
InstantController::PreviewCondition InstantController::GetPreviewConditionFor( |
const AutocompleteMatch& match, const TemplateURL** template_url) { |
- const TemplateURL* t_url = GetTemplateURL(match); |
+ const TemplateURL* t_url = match.template_url; |
if (t_url) { |
if (!t_url->id() || |
!t_url->instant_url() || |
@@ -738,16 +738,3 @@ void InstantController::ScheduleDestroy(InstantLoader* loader) { |
void InstantController::DestroyLoaders() { |
loaders_to_destroy_.reset(); |
} |
- |
-const TemplateURL* InstantController::GetTemplateURL( |
- const AutocompleteMatch& match) { |
- const TemplateURL* template_url = match.template_url; |
- if (match.type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED || |
- match.type == AutocompleteMatch::SEARCH_HISTORY || |
- match.type == AutocompleteMatch::SEARCH_SUGGEST) { |
- TemplateURLService* model = TemplateURLServiceFactory::GetForProfile( |
- tab_contents_->profile()); |
- template_url = model ? model->GetDefaultSearchProvider() : NULL; |
- } |
- return template_url; |
-} |