Chromium Code Reviews| 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..400c73503104b111d10d83246a5523960d24aa30 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); |
| if (search_terms.empty()) |
| return false; |
| InstantSearchPrerenderer* prerenderer = |
| - GetInstantSearchPrerenderer(profile()); |
| + GetInstantSearchPrerenderer(browser_profile); |
| if (prerenderer) { |
| if (prerenderer->CanCommitQuery(GetActiveWebContents(), search_terms)) { |
| // Submit query to render the prefetched results. Browser will swap the |
| @@ -93,7 +92,10 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition, |
| } |
| } |
| - return instant_.SubmitQuery(search_terms); |
| + // If we will not be replacing search terms from this URL, don't send to |
| + // InstantController. |
| + return chrome::IsSuitableURLForInstant(browser_profile, url) ? |
|
Jered
2014/02/11 19:10:10
nit:
if (!chrome::IsSuitableURLForInstant(browser_
kmadhusu
2014/02/11 23:24:32
Done.
|
| + instant_.SubmitQuery(search_terms) : false; |
| } |
| Profile* BrowserInstantController::profile() const { |