OLD | NEW |
---|---|
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 Loading... | |
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 (NetErrorHelper::Get(render_frame)->ShouldSuppressErrorPage(url)) | |
mmenke
2014/03/07 15:56:44
Need to pass in the render_frame, and have the Err
Elly Fong-Jones
2014/03/10 19:46:51
The NetErrorHelper already knows what RenderFrame
mmenke
2014/03/10 19:49:57
Right...but this message may not be coming from th
Elly Fong-Jones
2014/03/11 17:06:17
Done.
| |
992 return true; | |
991 // Do not flash an error page if the Instant new tab page fails to load. | 993 // Do not flash an error page if the Instant new tab page fails to load. |
992 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url); | 994 return search_bouncer_.get() && search_bouncer_->IsNewTabPage(url); |
993 } | 995 } |
994 | 996 |
995 void ChromeContentRendererClient::GetNavigationErrorStrings( | 997 void ChromeContentRendererClient::GetNavigationErrorStrings( |
996 content::RenderView* render_view, | 998 content::RenderView* render_view, |
997 blink::WebFrame* frame, | 999 blink::WebFrame* frame, |
998 const blink::WebURLRequest& failed_request, | 1000 const blink::WebURLRequest& failed_request, |
999 const blink::WebURLError& error, | 1001 const blink::WebURLError& error, |
1000 std::string* error_html, | 1002 std::string* error_html, |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1437 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1439 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1438 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1440 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1439 } | 1441 } |
1440 | 1442 |
1441 blink::WebWorkerPermissionClientProxy* | 1443 blink::WebWorkerPermissionClientProxy* |
1442 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1444 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1443 content::RenderFrame* render_frame, | 1445 content::RenderFrame* render_frame, |
1444 blink::WebFrame* frame) { | 1446 blink::WebFrame* frame) { |
1445 return new WorkerPermissionClientProxy(render_frame, frame); | 1447 return new WorkerPermissionClientProxy(render_frame, frame); |
1446 } | 1448 } |
OLD | NEW |