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

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

Issue 134183002: Pass frame to ChromeContentRendererClient::ShouldSuppressErrorPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix nits Created 6 years, 11 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 // Use an internal error page, if we have one for the status code. 930 // Use an internal error page, if we have one for the status code.
931 if (!LocalizedError::HasStrings(LocalizedError::kHttpErrorDomain, 931 if (!LocalizedError::HasStrings(LocalizedError::kHttpErrorDomain,
932 http_status_code)) { 932 http_status_code)) {
933 return false; 933 return false;
934 } 934 }
935 935
936 *error_domain = LocalizedError::kHttpErrorDomain; 936 *error_domain = LocalizedError::kHttpErrorDomain;
937 return true; 937 return true;
938 } 938 }
939 939
940 bool ChromeContentRendererClient::ShouldSuppressErrorPage(const GURL& url) { 940 bool ChromeContentRendererClient::ShouldSuppressErrorPage(
941 content::RenderFrame* render_frame,
942 const GURL& url) {
941 // Do not flash an error page if the Instant new tab page fails to load. 943 // Do not flash an error page if the Instant new tab page fails to load.
942 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url); 944 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url);
943 } 945 }
944 946
945 void ChromeContentRendererClient::GetNavigationErrorStrings( 947 void ChromeContentRendererClient::GetNavigationErrorStrings(
946 blink::WebFrame* frame, 948 blink::WebFrame* frame,
947 const blink::WebURLRequest& failed_request, 949 const blink::WebURLRequest& failed_request,
948 const blink::WebURLError& error, 950 const blink::WebURLError& error,
949 const std::string& accept_languages, 951 const std::string& accept_languages,
950 std::string* error_html, 952 std::string* error_html,
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1384 CommandLine* command_line = CommandLine::ForCurrentProcess();
1383 return !command_line->HasSwitch(switches::kExtensionProcess); 1385 return !command_line->HasSwitch(switches::kExtensionProcess);
1384 } 1386 }
1385 1387
1386 blink::WebWorkerPermissionClientProxy* 1388 blink::WebWorkerPermissionClientProxy*
1387 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1389 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1388 content::RenderFrame* render_frame, 1390 content::RenderFrame* render_frame,
1389 blink::WebFrame* frame) { 1391 blink::WebFrame* frame) {
1390 return new WorkerPermissionClientProxy(render_frame, frame); 1392 return new WorkerPermissionClientProxy(render_frame, frame);
1391 } 1393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698