Index: chrome/browser/instant/instant_controller.cc |
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
index 1fdec4c65816ea0925a8801d1d2a135a45dad2b5..7418c790ff63d5cfdeadeea06459d0a62b6247bb 100644 |
--- a/chrome/browser/instant/instant_controller.cc |
+++ b/chrome/browser/instant/instant_controller.cc |
@@ -549,6 +549,9 @@ bool InstantController::CommitIfPossible(InstantCommitType type) { |
net::EscapeQueryParamValue(query, true))); |
chrome::search::SearchTabHelper::FromWebContents(preview)-> |
NavigationEntryUpdated(); |
+ // Update |last_omnibox_text_| so that the controller commits the proper |
+ // query if the user focuses the omnibox and presses Enter. |
+ last_omnibox_text_ = ASCIIToUTF16(query); |
sreeram
2013/01/24 22:54:32
You only need to do this if we hit the "if" condit
Mathieu
2013/01/28 18:50:32
Done.
|
} |
} |
@@ -743,8 +746,9 @@ void InstantController::SetSuggestions( |
// This means a committed page in state search called setValue(). We should |
// update the omnibox to reflect what the search page says. |
browser_->SetInstantSuggestion(suggestion); |
- // Don't update last_omnibox_text_ or last_suggestion_ since the user is not |
- // currently editing text in the omnibox. |
+ // Update |last_omnibox_text_| so that the controller commits the proper |
+ // query if the user focuses the omnibox and presses Enter. |
+ last_omnibox_text_ = suggestion.text; |
sreeram
2013/01/24 22:54:32
Put this above the call to browser_->SetInstantSug
Mathieu
2013/01/28 18:50:32
Okay, copied the lines over there.
|
return; |
} |