| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 2188455fa56292686368d2f20e6aa6153d342cbe..36462c0bbb1ae5dec4d07b7f8b1f60d0270a64d9 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -1132,6 +1132,16 @@ bool Browser::CanOverscrollContent() const {
|
| #endif
|
| }
|
|
|
| +bool Browser::ShouldPreserveAbortedURLs(WebContents* source) {
|
| + // Allow failed URLs to stick around in the omnibox on the NTP, but not when
|
| + // other pages have committed.
|
| + Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
|
| + if (!profile || !source->GetController().GetLastCommittedEntry())
|
| + return false;
|
| + GURL committed_url(source->GetController().GetLastCommittedEntry()->GetURL());
|
| + return chrome::IsNTPURL(committed_url, profile);
|
| +}
|
| +
|
| bool Browser::PreHandleKeyboardEvent(content::WebContents* source,
|
| const NativeWebKeyboardEvent& event,
|
| bool* is_keyboard_shortcut) {
|
|
|