| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 void ChromeContentRendererClient::GetNavigationErrorStrings( | 1047 void ChromeContentRendererClient::GetNavigationErrorStrings( |
| 1048 content::RenderFrame* render_frame, | 1048 content::RenderFrame* render_frame, |
| 1049 const blink::WebURLRequest& failed_request, | 1049 const blink::WebURLRequest& failed_request, |
| 1050 const blink::WebURLError& error, | 1050 const blink::WebURLError& error, |
| 1051 std::string* error_html, | 1051 std::string* error_html, |
| 1052 base::string16* error_description) { | 1052 base::string16* error_description) { |
| 1053 const GURL failed_url = error.unreachableURL; | 1053 const GURL failed_url = error.unreachableURL; |
| 1054 | 1054 |
| 1055 bool is_post = base::EqualsASCII( | 1055 bool is_post = base::EqualsASCII( |
| 1056 base::StringPiece16(failed_request.httpMethod()), "POST"); | 1056 base::StringPiece16(failed_request.httpMethod()), "POST"); |
| 1057 bool is_ignoring_cache = failed_request.getCachePolicy() == | 1057 bool is_ignoring_cache = |
| 1058 blink::WebURLRequest::ReloadBypassingCache; | 1058 failed_request.getCachePolicy() == blink::WebURLRequest::BypassingCache; |
| 1059 if (error_html) { | 1059 if (error_html) { |
| 1060 NetErrorHelper::Get(render_frame) | 1060 NetErrorHelper::Get(render_frame) |
| 1061 ->GetErrorHTML(error, is_post, is_ignoring_cache, error_html); | 1061 ->GetErrorHTML(error, is_post, is_ignoring_cache, error_html); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 if (error_description) { | 1064 if (error_description) { |
| 1065 *error_description = error_page::LocalizedError::GetErrorDetails( | 1065 *error_description = error_page::LocalizedError::GetErrorDetails( |
| 1066 error.domain.utf8(), error.reason, is_post); | 1066 error.domain.utf8(), error.reason, is_post); |
| 1067 } | 1067 } |
| 1068 } | 1068 } |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 // chrome.system.network.getNetworkInterfaces provides the same | 1432 // chrome.system.network.getNetworkInterfaces provides the same |
| 1433 // information. Also, the enforcement of sending and binding UDP is already done | 1433 // information. Also, the enforcement of sending and binding UDP is already done |
| 1434 // by chrome extension permission model. | 1434 // by chrome extension permission model. |
| 1435 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1435 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
| 1436 #if defined(ENABLE_EXTENSIONS) | 1436 #if defined(ENABLE_EXTENSIONS) |
| 1437 return !IsStandaloneExtensionProcess(); | 1437 return !IsStandaloneExtensionProcess(); |
| 1438 #else | 1438 #else |
| 1439 return true; | 1439 return true; |
| 1440 #endif | 1440 #endif |
| 1441 } | 1441 } |
| OLD | NEW |