From 2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Thu, 19 Feb 2009 18:41:31 +0000 Subject: Send over the HTTP status code in the ViewHostMsg_FrameNavigate message coming in from the renderer. A failed HTTP navigation like a 404 response to a request is followed by two responses. The first one which is associated with the failed response. This does not send over any information about the failure to the browser and thus appears as a normal navigation.The second response is for the actual 404 page being loaded. For network errors the browser does get notified via RenderView::DidFailProvisionalLoadWithError. However due to a prototype mismatch the corresponding function in WebContents is never invoked. Added a new automation message AutomationMsg_NavigationFailed, which carries information about failed navigations to automation clients.The changes to the navigation controller include sending over the http status code and the URL to observers. The ExternalTabContainer also subscribes to the FAIL_PROVISIONAL_LOAD_WITH_ERROR notification, so it can inform clients about errors. We also ignore the next NAV_ENTRY_COMMITTED notification after an error due to the reasons mentioned above. Review URL: http://codereview.chromium.org/21495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10023 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/navigation_controller.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chrome/browser/tab_contents/navigation_controller.h') diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h index c1bf3fa..a7518c3 100644 --- a/chrome/browser/tab_contents/navigation_controller.h +++ b/chrome/browser/tab_contents/navigation_controller.h @@ -107,6 +107,9 @@ class NavigationController { bool is_user_initiated_main_frame_load() const { return !is_auto && !is_in_page && is_main_frame; } + + // The HTTP status code for this entry.. + int http_status_code; }; // Details sent for NOTIFY_NAV_LIST_PRUNED. -- cgit v1.1