Index: chrome/browser/ui/browser_instant_controller.cc |
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc |
index ddab4540183761035001486542a359c02fcca053..01d24bc0d90e3425ac6cbb6b16a7423576e54f19 100644 |
--- a/chrome/browser/ui/browser_instant_controller.cc |
+++ b/chrome/browser/ui/browser_instant_controller.cc |
@@ -73,15 +73,14 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition, |
// support for the new disposition. |
DCHECK(disposition == CURRENT_TAB) << disposition; |
- // If we will not be replacing search terms from this URL, don't send to |
- // InstantController. |
+ Profile* browser_profile = profile(); |
const base::string16& search_terms = |
- chrome::GetSearchTermsFromURL(browser_->profile(), url); |
+ chrome::ExtractSearchTermsFromURL(browser_profile, url); |
samarth
2014/02/12 18:02:39
nit: just use profile() here?
kmadhusu
2014/02/12 19:58:09
Done.
|
if (search_terms.empty()) |
return false; |
InstantSearchPrerenderer* prerenderer = |
- GetInstantSearchPrerenderer(profile()); |
+ GetInstantSearchPrerenderer(browser_profile); |
samarth
2014/02/12 18:02:39
Likewise here and below
kmadhusu
2014/02/12 19:58:09
Done.
|
if (prerenderer) { |
if (prerenderer->CanCommitQuery(GetActiveWebContents(), search_terms)) { |
// Submit query to render the prefetched results. Browser will swap the |
@@ -93,6 +92,11 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition, |
} |
} |
+ // If we will not be replacing search terms from this URL, don't send to |
+ // InstantController. |
+ if (!chrome::IsQueryExtractionAllowedForURL(browser_profile, url)) |
+ return false; |
+ |
return instant_.SubmitQuery(search_terms); |
} |