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

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: More fixes 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 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame
992 && NetErrorHelper::Get(render_frame)->ShouldSuppressErrorPage(url))
mmenke 2014/03/04 17:26:25 Optional: I think it's cleaner not to have the ma
Elly Fong-Jones 2014/03/06 21:48:37 Done.
993 return true;
mmenke 2014/03/04 17:26:25 nit: Use braces when either part of an if takes m
Elly Fong-Jones 2014/03/06 21:48:37 Done.
991 // Do not flash an error page if the Instant new tab page fails to load. 994 // Do not flash an error page if the Instant new tab page fails to load.
992 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url); 995 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url);
993 } 996 }
994 997
995 void ChromeContentRendererClient::GetNavigationErrorStrings( 998 void ChromeContentRendererClient::GetNavigationErrorStrings(
996 content::RenderView* render_view, 999 content::RenderView* render_view,
997 blink::WebFrame* frame, 1000 blink::WebFrame* frame,
998 const blink::WebURLRequest& failed_request, 1001 const blink::WebURLRequest& failed_request,
999 const blink::WebURLError& error, 1002 const blink::WebURLError& error,
1000 std::string* error_html, 1003 std::string* error_html,
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1440 CommandLine* command_line = CommandLine::ForCurrentProcess();
1438 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1441 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1439 } 1442 }
1440 1443
1441 blink::WebWorkerPermissionClientProxy* 1444 blink::WebWorkerPermissionClientProxy*
1442 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1445 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1443 content::RenderFrame* render_frame, 1446 content::RenderFrame* render_frame,
1444 blink::WebFrame* frame) { 1447 blink::WebFrame* frame) {
1445 return new WorkerPermissionClientProxy(render_frame, frame); 1448 return new WorkerPermissionClientProxy(render_frame, frame);
1446 } 1449 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698