Prevent a possible crash on omnibox navigation.
commit8215378f588fa67251c277e326437188efda1dcc
authorpkasting <pkasting@chromium.org>
Fri, 23 Jan 2015 22:36:06 +0000 (23 14:36 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 23 Jan 2015 22:37:10 +0000 (23 22:37 +0000)
treeedb7e1a76d1046139baefb889923572ebd9b49c1
parent61aa5180a1fbbd40722d96433b3fb2ca5a328ee1
Prevent a possible crash on omnibox navigation.

If the user enters a word that triggers the alternate nav infobar (i.e. is a
search by default but also happens to be an intranet hostname), and the omnibox
navigation synchronously triggers the extension system to navigate a background
page, the background page navigation could be mistaken for the omnibox
navigation, leading to a crash when trying to show the infobar.

This could also goof up shortcut backend statistics, in theory, if the
background page navigation succeeded but the omnibox navigation did not.

This CL also adds a different CHECK to verify that the navigations that we do
pay attention to are the ones we want.  I'll convert this to a DCHECK in a
couple of weeks if it doesn't turn up anything in the field.

BUG=363105
TEST=none

Review URL: https://codereview.chromium.org/865313002

Cr-Commit-Position: refs/heads/master@{#312950}
chrome/browser/ui/omnibox/omnibox_navigation_observer.cc
chrome/browser/ui/omnibox/omnibox_navigation_observer.h