| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 int resource_id; | 838 int resource_id; |
| 839 DictionaryValue error_strings; | 839 DictionaryValue error_strings; |
| 840 if (extension && !extension->from_bookmark()) { | 840 if (extension && !extension->from_bookmark()) { |
| 841 LocalizedError::GetAppErrorStrings(error, failed_url, extension, | 841 LocalizedError::GetAppErrorStrings(error, failed_url, extension, |
| 842 &error_strings); | 842 &error_strings); |
| 843 | 843 |
| 844 // TODO(erikkay): Should we use a different template for different | 844 // TODO(erikkay): Should we use a different template for different |
| 845 // error messages? | 845 // error messages? |
| 846 resource_id = IDR_ERROR_APP_HTML; | 846 resource_id = IDR_ERROR_APP_HTML; |
| 847 } else { | 847 } else { |
| 848 if (is_repost) { | 848 const std::string locale = RenderThread::Get()->GetLocale(); |
| 849 if (NetErrorHelper::GetErrorStringsForDnsProbe( |
| 850 error, &error_strings, locale)) { |
| 851 // We got error strings for the "DNS probe possible" page. |
| 852 // NetErrorHelper will update it later. |
| 853 } else if (is_repost) { |
| 849 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); | 854 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); |
| 850 } else { | 855 } else { |
| 851 LocalizedError::GetStrings(error, &error_strings, | 856 LocalizedError::GetStrings(error, &error_strings, |
| 852 RenderThread::Get()->GetLocale()); | 857 RenderThread::Get()->GetLocale()); |
| 853 } | 858 } |
| 854 resource_id = IDR_NET_ERROR_HTML; | 859 resource_id = IDR_NET_ERROR_HTML; |
| 855 } | 860 } |
| 856 | 861 |
| 857 const base::StringPiece template_html( | 862 const base::StringPiece template_html( |
| 858 ResourceBundle::GetSharedInstance().GetRawDataResource( | 863 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 | 1193 |
| 1189 if (container->element().shadowHost().isNull()) | 1194 if (container->element().shadowHost().isNull()) |
| 1190 return false; | 1195 return false; |
| 1191 | 1196 |
| 1192 WebString tag_name = container->element().shadowHost().tagName(); | 1197 WebString tag_name = container->element().shadowHost().tagName(); |
| 1193 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || | 1198 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || |
| 1194 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); | 1199 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); |
| 1195 } | 1200 } |
| 1196 | 1201 |
| 1197 } // namespace chrome | 1202 } // namespace chrome |
| OLD | NEW |