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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 136203009: Support auto-reload on errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Add MockableOneShotTimer tests. Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 return false; 981 return false;
982 } 982 }
983 983
984 *error_domain = LocalizedError::kHttpErrorDomain; 984 *error_domain = LocalizedError::kHttpErrorDomain;
985 return true; 985 return true;
986 } 986 }
987 987
988 bool ChromeContentRendererClient::ShouldSuppressErrorPage( 988 bool ChromeContentRendererClient::ShouldSuppressErrorPage(
989 content::RenderFrame* render_frame, 989 content::RenderFrame* render_frame,
990 const GURL& url) { 990 const GURL& url) {
991 content::RenderView* render_view = render_frame->GetRenderView();
992 content::RenderFrame* main_render_frame = render_view->GetMainRenderFrame();
993 blink::WebFrame* web_frame = render_frame->GetWebFrame();
mmenke 2014/03/11 20:07:54 optional: May want to get rid of this local varia
Elly Fong-Jones 2014/03/12 15:08:58 I inserted it to keep the ShouldSuppressErrorPage
994 NetErrorHelper* net_error_helper = NetErrorHelper::Get(main_render_frame);
995 if (net_error_helper->ShouldSuppressErrorPage(web_frame, url))
996 return true;
991 // Do not flash an error page if the Instant new tab page fails to load. 997 // Do not flash an error page if the Instant new tab page fails to load.
992 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url); 998 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url);
993 } 999 }
994 1000
995 void ChromeContentRendererClient::GetNavigationErrorStrings( 1001 void ChromeContentRendererClient::GetNavigationErrorStrings(
996 content::RenderView* render_view, 1002 content::RenderView* render_view,
997 blink::WebFrame* frame, 1003 blink::WebFrame* frame,
998 const blink::WebURLRequest& failed_request, 1004 const blink::WebURLRequest& failed_request,
999 const blink::WebURLError& error, 1005 const blink::WebURLError& error,
1000 std::string* error_html, 1006 std::string* error_html,
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1443 CommandLine* command_line = CommandLine::ForCurrentProcess();
1438 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1444 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1439 } 1445 }
1440 1446
1441 blink::WebWorkerPermissionClientProxy* 1447 blink::WebWorkerPermissionClientProxy*
1442 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1448 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1443 content::RenderFrame* render_frame, 1449 content::RenderFrame* render_frame,
1444 blink::WebFrame* frame) { 1450 blink::WebFrame* frame) {
1445 return new WorkerPermissionClientProxy(render_frame, frame); 1451 return new WorkerPermissionClientProxy(render_frame, frame);
1446 } 1452 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698