Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1915)

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 7321001: Changes SearchProvider to set the description of the first consecutive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
-}
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698