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 6cbab7281d2b8cf3f3e76570786f6b5837f94eef..f447f13a3a2ba416dbfbbf65e5ff92227b5c8ce2 100644 |
--- a/chrome/browser/ui/browser_instant_controller.cc |
+++ b/chrome/browser/ui/browser_instant_controller.cc |
@@ -73,16 +73,11 @@ 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. |
- const base::string16& search_terms = |
- chrome::GetSearchTermsFromURL(browser_->profile(), url); |
- if (search_terms.empty()) |
- return false; |
- |
InstantSearchPrerenderer* prerenderer = |
GetInstantSearchPrerenderer(profile()); |
if (prerenderer) { |
+ const base::string16& search_terms = |
+ prerenderer->GetSearchTermsFromURL(url); |
if (prerenderer->CanCommitQuery(GetActiveWebContents(), search_terms)) { |
// Submit query to render the prefetched results. Browser will swap the |
// prerendered contents with the active tab contents. |
@@ -93,6 +88,12 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition, |
} |
} |
+ // If we will not be replacing search terms from this URL, don't send to |
+ // InstantController. |
+ const base::string16& search_terms = |
Jered
2014/02/07 03:02:26
Can we find a way to do this where we don't try to
kmadhusu
2014/02/11 01:40:02
Done.
|
+ chrome::GetSearchTermsFromURL(browser_->profile(), url); |
+ if (search_terms.empty()) |
+ return false; |
return instant_.SubmitQuery(search_terms); |
} |