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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 if (failed_url.is_valid() && !failed_url.SchemeIs(chrome::kExtensionScheme)) { | 569 if (failed_url.is_valid() && !failed_url.SchemeIs(chrome::kExtensionScheme)) { |
570 extension = extension_dispatcher_->extensions()->GetExtensionOrAppByURL( | 570 extension = extension_dispatcher_->extensions()->GetExtensionOrAppByURL( |
571 ExtensionURLInfo(failed_url)); | 571 ExtensionURLInfo(failed_url)); |
572 } | 572 } |
573 | 573 |
574 if (error_html) { | 574 if (error_html) { |
575 // Use a local error page. | 575 // Use a local error page. |
576 int resource_id; | 576 int resource_id; |
577 DictionaryValue error_strings; | 577 DictionaryValue error_strings; |
578 if (extension) { | 578 if (extension && !extension->from_bookmark()) { |
579 LocalizedError::GetAppErrorStrings(error, failed_url, extension, | 579 LocalizedError::GetAppErrorStrings(error, failed_url, extension, |
580 &error_strings); | 580 &error_strings); |
581 | 581 |
582 // TODO(erikkay): Should we use a different template for different | 582 // TODO(erikkay): Should we use a different template for different |
583 // error messages? | 583 // error messages? |
584 resource_id = IDR_ERROR_APP_HTML; | 584 resource_id = IDR_ERROR_APP_HTML; |
585 } else { | 585 } else { |
586 if (is_repost) { | 586 if (is_repost) { |
587 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); | 587 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); |
588 } else { | 588 } else { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 822 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
823 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 823 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
824 } | 824 } |
825 | 825 |
826 bool ChromeContentRendererClient::AllowSocketAPI(const GURL& url) { | 826 bool ChromeContentRendererClient::AllowSocketAPI(const GURL& url) { |
827 return allowed_socket_origins_.find(url.host()) != | 827 return allowed_socket_origins_.find(url.host()) != |
828 allowed_socket_origins_.end(); | 828 allowed_socket_origins_.end(); |
829 } | 829 } |
830 | 830 |
831 } // namespace chrome | 831 } // namespace chrome |
OLD | NEW |