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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 void ChromeContentRendererClient::GetNavigationErrorStrings( | 1048 void ChromeContentRendererClient::GetNavigationErrorStrings( |
1049 content::RenderFrame* render_frame, | 1049 content::RenderFrame* render_frame, |
1050 const blink::WebURLRequest& failed_request, | 1050 const blink::WebURLRequest& failed_request, |
1051 const blink::WebURLError& error, | 1051 const blink::WebURLError& error, |
1052 std::string* error_html, | 1052 std::string* error_html, |
1053 base::string16* error_description) { | 1053 base::string16* error_description) { |
1054 const GURL failed_url = error.unreachableURL; | 1054 const GURL failed_url = error.unreachableURL; |
1055 | 1055 |
1056 bool is_post = base::EqualsASCII( | 1056 bool is_post = base::EqualsASCII( |
1057 base::StringPiece16(failed_request.httpMethod()), "POST"); | 1057 base::StringPiece16(failed_request.httpMethod()), "POST"); |
1058 bool is_ignoring_cache = failed_request.cachePolicy() == | 1058 bool is_ignoring_cache = failed_request.getCachePolicy() == |
1059 blink::WebURLRequest::ReloadBypassingCache; | 1059 blink::WebURLRequest::ReloadBypassingCache; |
1060 if (error_html) { | 1060 if (error_html) { |
1061 NetErrorHelper::Get(render_frame) | 1061 NetErrorHelper::Get(render_frame) |
1062 ->GetErrorHTML(error, is_post, is_ignoring_cache, error_html); | 1062 ->GetErrorHTML(error, is_post, is_ignoring_cache, error_html); |
1063 } | 1063 } |
1064 | 1064 |
1065 if (error_description) { | 1065 if (error_description) { |
1066 *error_description = error_page::LocalizedError::GetErrorDetails( | 1066 *error_description = error_page::LocalizedError::GetErrorDetails( |
1067 error.domain.utf8(), error.reason, is_post); | 1067 error.domain.utf8(), error.reason, is_post); |
1068 } | 1068 } |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 #if defined(ENABLE_EXTENSIONS) | 1419 #if defined(ENABLE_EXTENSIONS) |
1420 return !IsStandaloneExtensionProcess(); | 1420 return !IsStandaloneExtensionProcess(); |
1421 #else | 1421 #else |
1422 return true; | 1422 return true; |
1423 #endif | 1423 #endif |
1424 } | 1424 } |
1425 | 1425 |
1426 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { | 1426 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { |
1427 return origin_trial_key_manager_.GetPublicKey(); | 1427 return origin_trial_key_manager_.GetPublicKey(); |
1428 } | 1428 } |
OLD | NEW |