Chromium Code Reviews| Index: chrome/browser/ui/search/instant_controller.cc |
| diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc |
| index 83f1e345833a15ef85e88f0bd2df06d9dfbae3a5..15f6413bdeccf1ec3492f253cadd8c4d51142e2a 100644 |
| --- a/chrome/browser/ui/search/instant_controller.cc |
| +++ b/chrome/browser/ui/search/instant_controller.cc |
| @@ -462,7 +462,7 @@ bool InstantController::Update(const AutocompleteMatch& match, |
| // to a backup loader. |
| if (extended_enabled_ && !overlay_->supports_instant() && |
| !overlay_->IsLocalOverlay() && browser_->GetActiveWebContents()) { |
| - CreateOverlay(chrome::kChromeSearchLocalOmniboxPopupURL, |
| + CreateOverlay(chrome::kChromeSearchLocalNtpUrl, |
|
samarth
2013/04/15 19:01:34
Replace this (and below) with a GetLocalInstantURL
jeremycho
2013/04/16 01:42:37
Done.
|
| browser_->GetActiveWebContents()); |
| } |
| @@ -670,6 +670,7 @@ bool InstantController::CommitIfPossible(InstantCommitType type) { |
| // to the page, but otherwise, nothing else to do. |
| if (UseInstantTabToShowSuggestions()) { |
| if (type == INSTANT_COMMIT_PRESSED_ENTER && |
| + !instant_tab_->IsLocalNTP() && |
| (last_match_was_search_ || |
| last_suggestion_.behavior == INSTANT_COMPLETE_NEVER)) { |
| last_suggestion_.text.clear(); |
| @@ -1287,7 +1288,7 @@ bool InstantController::EnsureOverlayIsCurrent(bool ignore_blacklist) { |
| if (!GetInstantURL(profile, ignore_blacklist, &instant_url)) { |
| // If we are in extended mode, fallback to the local overlay. |
| if (extended_enabled_) |
| - instant_url = chrome::kChromeSearchLocalOmniboxPopupURL; |
| + instant_url = chrome::kChromeSearchLocalNtpUrl; |
|
samarth
2013/04/15 19:01:34
Use the GetLocalInstantURL() function here too.
jeremycho
2013/04/16 01:42:37
Done.
|
| else |
| return false; |
| } |
| @@ -1615,7 +1616,7 @@ bool InstantController::FixSuggestion(InstantSuggestion* suggestion) const { |
| } |
| bool InstantController::UseInstantTabToShowSuggestions() const { |
|
samarth
2013/04/15 19:01:34
You can just inline this check wherever this funct
jeremycho
2013/04/16 01:42:37
Done.
|
| - return instant_tab_ && !instant_tab_->IsLocalNTP(); |
| + return instant_tab_; |
| } |
| bool InstantController::ShouldSwitchToLocalNTP() const { |