Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/renderer/render_view.cc

Issue 6995091: Avoid a NOT_REACHED() hit when we get an empty 404 page and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 2627
2628 // Display error page, if appropriate. 2628 // Display error page, if appropriate.
2629 int http_status_code = navigation_state->http_status_code(); 2629 int http_status_code = navigation_state->http_status_code();
2630 if (http_status_code == 404) { 2630 if (http_status_code == 404) {
2631 // On 404s, try a remote search page as a fallback. 2631 // On 404s, try a remote search page as a fallback.
2632 const GURL& frame_url = frame->url(); 2632 const GURL& frame_url = frame->url();
2633 2633
2634 const GURL& error_page_url = GetAlternateErrorPageURL(frame_url, HTTP_404); 2634 const GURL& error_page_url = GetAlternateErrorPageURL(frame_url, HTTP_404);
2635 if (error_page_url.is_valid()) { 2635 if (error_page_url.is_valid()) {
2636 WebURLError original_error; 2636 WebURLError original_error;
2637 original_error.domain = "http";
2638 original_error.reason = 404;
2637 original_error.unreachableURL = frame_url; 2639 original_error.unreachableURL = frame_url;
2638 2640
2639 navigation_state->set_alt_error_page_fetcher( 2641 navigation_state->set_alt_error_page_fetcher(
2640 new AltErrorPageResourceFetcher( 2642 new AltErrorPageResourceFetcher(
2641 error_page_url, frame, original_error, 2643 error_page_url, frame, original_error,
2642 NewCallback(this, &RenderView::AltErrorPageFinished))); 2644 NewCallback(this, &RenderView::AltErrorPageFinished)));
2643 return; 2645 return;
2644 } 2646 }
2645 } 2647 }
2646 2648
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4242 const webkit_glue::CustomContextMenuContext& custom_context) { 4244 const webkit_glue::CustomContextMenuContext& custom_context) {
4243 if (custom_context.is_pepper_menu) 4245 if (custom_context.is_pepper_menu)
4244 pepper_delegate_.OnContextMenuClosed(custom_context); 4246 pepper_delegate_.OnContextMenuClosed(custom_context);
4245 else 4247 else
4246 context_menu_node_.reset(); 4248 context_menu_node_.reset();
4247 } 4249 }
4248 4250
4249 void RenderView::OnNetworkStateChanged(bool online) { 4251 void RenderView::OnNetworkStateChanged(bool online) {
4250 WebNetworkStateNotifier::setOnLine(online); 4252 WebNetworkStateNotifier::setOnLine(online);
4251 } 4253 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698