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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "chrome/renderer/media/chrome_key_systems.h" | 43 #include "chrome/renderer/media/chrome_key_systems.h" |
44 #include "chrome/renderer/net/net_error_helper.h" | 44 #include "chrome/renderer/net/net_error_helper.h" |
45 #include "chrome/renderer/net/prescient_networking_dispatcher.h" | 45 #include "chrome/renderer/net/prescient_networking_dispatcher.h" |
46 #include "chrome/renderer/net/renderer_net_predictor.h" | 46 #include "chrome/renderer/net/renderer_net_predictor.h" |
47 #include "chrome/renderer/net_benchmarking_extension.h" | 47 #include "chrome/renderer/net_benchmarking_extension.h" |
48 #include "chrome/renderer/page_load_histograms.h" | 48 #include "chrome/renderer/page_load_histograms.h" |
49 #include "chrome/renderer/pepper/pepper_helper.h" | 49 #include "chrome/renderer/pepper/pepper_helper.h" |
50 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h" | 50 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h" |
51 #include "chrome/renderer/pepper/ppb_pdf_impl.h" | 51 #include "chrome/renderer/pepper/ppb_pdf_impl.h" |
52 #include "chrome/renderer/playback_extension.h" | 52 #include "chrome/renderer/playback_extension.h" |
53 #include "chrome/renderer/plugins/plugin_placeholder.h" | 53 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" |
54 #include "chrome/renderer/plugins/plugin_uma.h" | 54 #include "chrome/renderer/plugins/plugin_uma.h" |
55 #include "chrome/renderer/prerender/prerender_dispatcher.h" | 55 #include "chrome/renderer/prerender/prerender_dispatcher.h" |
56 #include "chrome/renderer/prerender/prerender_helper.h" | 56 #include "chrome/renderer/prerender/prerender_helper.h" |
57 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" | 57 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" |
58 #include "chrome/renderer/prerender/prerenderer_client.h" | 58 #include "chrome/renderer/prerender/prerenderer_client.h" |
59 #include "chrome/renderer/printing/print_web_view_helper.h" | 59 #include "chrome/renderer/printing/print_web_view_helper.h" |
60 #include "chrome/renderer/safe_browsing/malware_dom_details.h" | 60 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
61 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 61 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
62 #include "chrome/renderer/searchbox/search_bouncer.h" | 62 #include "chrome/renderer/searchbox/search_bouncer.h" |
63 #include "chrome/renderer/searchbox/searchbox.h" | 63 #include "chrome/renderer/searchbox/searchbox.h" |
64 #include "chrome/renderer/searchbox/searchbox_extension.h" | 64 #include "chrome/renderer/searchbox/searchbox_extension.h" |
65 #include "chrome/renderer/tts_dispatcher.h" | 65 #include "chrome/renderer/tts_dispatcher.h" |
66 #include "chrome/renderer/validation_message_agent.h" | 66 #include "chrome/renderer/validation_message_agent.h" |
67 #include "components/autofill/content/renderer/autofill_agent.h" | 67 #include "components/autofill/content/renderer/autofill_agent.h" |
68 #include "components/autofill/content/renderer/password_autofill_agent.h" | 68 #include "components/autofill/content/renderer/password_autofill_agent.h" |
69 #include "components/autofill/content/renderer/password_generation_agent.h" | 69 #include "components/autofill/content/renderer/password_generation_agent.h" |
70 #include "components/autofill/core/common/password_generation_util.h" | 70 #include "components/autofill/core/common/password_generation_util.h" |
| 71 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
71 #include "components/visitedlink/renderer/visitedlink_slave.h" | 72 #include "components/visitedlink/renderer/visitedlink_slave.h" |
72 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
73 #include "content/public/renderer/render_thread.h" | 74 #include "content/public/renderer/render_thread.h" |
74 #include "content/public/renderer/render_view.h" | 75 #include "content/public/renderer/render_view.h" |
75 #include "content/public/renderer/render_view_visitor.h" | 76 #include "content/public/renderer/render_view_visitor.h" |
76 #include "extensions/common/constants.h" | 77 #include "extensions/common/constants.h" |
77 #include "extensions/common/extension_urls.h" | 78 #include "extensions/common/extension_urls.h" |
78 #include "grit/generated_resources.h" | 79 #include "grit/generated_resources.h" |
79 #include "grit/locale_settings.h" | 80 #include "grit/locale_settings.h" |
80 #include "grit/renderer_resources.h" | 81 #include "grit/renderer_resources.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 #else | 463 #else |
463 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; | 464 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; |
464 #endif | 465 #endif |
465 *plugin = CreatePlugin(render_view, frame, params, output); | 466 *plugin = CreatePlugin(render_view, frame, params, output); |
466 return true; | 467 return true; |
467 } | 468 } |
468 | 469 |
469 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( | 470 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( |
470 content::RenderView* render_view, | 471 content::RenderView* render_view, |
471 const base::FilePath& plugin_path) { | 472 const base::FilePath& plugin_path) { |
472 PluginPlaceholder* placeholder = | 473 ChromePluginPlaceholder* placeholder = |
473 PluginPlaceholder::CreateErrorPlugin(render_view, plugin_path); | 474 ChromePluginPlaceholder::CreateErrorPlugin(render_view, plugin_path); |
474 return placeholder->plugin(); | 475 return placeholder->plugin(); |
475 } | 476 } |
476 | 477 |
477 void ChromeContentRendererClient::DeferMediaLoad( | 478 void ChromeContentRendererClient::DeferMediaLoad( |
478 content::RenderView* render_view, | 479 content::RenderView* render_view, |
479 const base::Closure& closure) { | 480 const base::Closure& closure) { |
480 #if defined(OS_ANDROID) | 481 #if defined(OS_ANDROID) |
481 // Chromium for Android doesn't support prerender yet. | 482 // Chromium for Android doesn't support prerender yet. |
482 closure.Run(); | 483 closure.Run(); |
483 return; | 484 return; |
(...skipping 14 matching lines...) Expand all Loading... |
498 const WebPluginParams& original_params, | 499 const WebPluginParams& original_params, |
499 const ChromeViewHostMsg_GetPluginInfo_Output& output) { | 500 const ChromeViewHostMsg_GetPluginInfo_Output& output) { |
500 const ChromeViewHostMsg_GetPluginInfo_Status& status = output.status; | 501 const ChromeViewHostMsg_GetPluginInfo_Status& status = output.status; |
501 const WebPluginInfo& plugin = output.plugin; | 502 const WebPluginInfo& plugin = output.plugin; |
502 const std::string& actual_mime_type = output.actual_mime_type; | 503 const std::string& actual_mime_type = output.actual_mime_type; |
503 const string16& group_name = output.group_name; | 504 const string16& group_name = output.group_name; |
504 const std::string& identifier = output.group_identifier; | 505 const std::string& identifier = output.group_identifier; |
505 ChromeViewHostMsg_GetPluginInfo_Status::Value status_value = status.value; | 506 ChromeViewHostMsg_GetPluginInfo_Status::Value status_value = status.value; |
506 GURL url(original_params.url); | 507 GURL url(original_params.url); |
507 std::string orig_mime_type = original_params.mimeType.utf8(); | 508 std::string orig_mime_type = original_params.mimeType.utf8(); |
508 PluginPlaceholder* placeholder = NULL; | 509 ChromePluginPlaceholder* placeholder = NULL; |
509 | 510 |
510 // If the browser plugin is to be enabled, this should be handled by the | 511 // If the browser plugin is to be enabled, this should be handled by the |
511 // renderer, so the code won't reach here due to the early exit in | 512 // renderer, so the code won't reach here due to the early exit in |
512 // OverrideCreatePlugin. | 513 // OverrideCreatePlugin. |
513 if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound || | 514 if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound || |
514 orig_mime_type == content::kBrowserPluginMimeType) { | 515 orig_mime_type == content::kBrowserPluginMimeType) { |
515 #if defined(ENABLE_MOBILE_YOUTUBE_PLUGIN) | 516 #if defined(OS_ANDROID) |
516 if (PluginPlaceholder::IsYouTubeURL(url, orig_mime_type)) | 517 if (plugins::MobileYouTubePlugin::IsYouTubeURL(url, orig_mime_type)) { |
517 return PluginPlaceholder::CreateMobileYoutubePlugin(render_view, frame, | 518 base::StringPiece template_html( |
518 original_params)->plugin(); | 519 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 520 IDR_MOBILE_YOUTUBE_PLUGIN_HTML)); |
| 521 return (new plugins::MobileYouTubePlugin( |
| 522 render_view, |
| 523 frame, |
| 524 original_params, |
| 525 template_html, |
| 526 GURL(ChromePluginPlaceholder::kPluginPlaceholderDataURL))) |
| 527 ->plugin(); |
| 528 } |
519 #endif | 529 #endif |
520 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, url); | 530 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, url); |
521 placeholder = PluginPlaceholder::CreateMissingPlugin( | 531 placeholder = ChromePluginPlaceholder::CreateMissingPlugin( |
522 render_view, frame, original_params); | 532 render_view, frame, original_params); |
523 } else { | 533 } else { |
524 // TODO(bauerb): This should be in content/. | 534 // TODO(bauerb): This should be in content/. |
525 WebPluginParams params(original_params); | 535 WebPluginParams params(original_params); |
526 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { | 536 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { |
527 if (plugin.mime_types[i].mime_type == actual_mime_type) { | 537 if (plugin.mime_types[i].mime_type == actual_mime_type) { |
528 AppendParams(plugin.mime_types[i].additional_param_names, | 538 AppendParams(plugin.mime_types[i].additional_param_names, |
529 plugin.mime_types[i].additional_param_values, | 539 plugin.mime_types[i].additional_param_values, |
530 ¶ms.attributeNames, | 540 ¶ms.attributeNames, |
531 ¶ms.attributeValues); | 541 ¶ms.attributeValues); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 "Only unpacked extensions and apps installed from the Chrome " | 635 "Only unpacked extensions and apps installed from the Chrome " |
626 "Web Store can load NaCl modules without enabling Native " | 636 "Web Store can load NaCl modules without enabling Native " |
627 "Client in about:flags."; | 637 "Client in about:flags."; |
628 } else if (is_pnacl_mime_type) { | 638 } else if (is_pnacl_mime_type) { |
629 error_message = | 639 error_message = |
630 "Portable Native Client must not be disabled in about:flags."; | 640 "Portable Native Client must not be disabled in about:flags."; |
631 } | 641 } |
632 frame->addMessageToConsole( | 642 frame->addMessageToConsole( |
633 WebConsoleMessage(WebConsoleMessage::LevelError, | 643 WebConsoleMessage(WebConsoleMessage::LevelError, |
634 error_message)); | 644 error_message)); |
635 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 645 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
636 render_view, frame, params, plugin, identifier, group_name, | 646 render_view, |
| 647 frame, |
| 648 params, |
| 649 plugin, |
| 650 identifier, |
| 651 group_name, |
637 IDR_BLOCKED_PLUGIN_HTML, | 652 IDR_BLOCKED_PLUGIN_HTML, |
638 #if defined(OS_CHROMEOS) | 653 #if defined(OS_CHROMEOS) |
639 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); | 654 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); |
640 #else | 655 #else |
641 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); | 656 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
642 #endif | 657 #endif |
643 break; | 658 break; |
644 } | 659 } |
645 } | 660 } |
646 | 661 |
647 // Delay loading plugins if prerendering. | 662 // Delay loading plugins if prerendering. |
648 // TODO(mmenke): In the case of prerendering, feed into | 663 // TODO(mmenke): In the case of prerendering, feed into |
649 // ChromeContentRendererClient::CreatePlugin instead, to | 664 // ChromeContentRendererClient::CreatePlugin instead, to |
650 // reduce the chance of future regressions. | 665 // reduce the chance of future regressions. |
651 if (prerender::PrerenderHelper::IsPrerendering(render_view)) { | 666 if (prerender::PrerenderHelper::IsPrerendering(render_view)) { |
652 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 667 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
653 render_view, frame, params, plugin, identifier, group_name, | 668 render_view, |
| 669 frame, |
| 670 params, |
| 671 plugin, |
| 672 identifier, |
| 673 group_name, |
654 IDR_CLICK_TO_PLAY_PLUGIN_HTML, | 674 IDR_CLICK_TO_PLAY_PLUGIN_HTML, |
655 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); | 675 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); |
656 placeholder->set_blocked_for_prerendering(true); | 676 placeholder->set_blocked_for_prerendering(true); |
657 placeholder->set_allow_loading(true); | 677 placeholder->set_allow_loading(true); |
658 break; | 678 break; |
659 } | 679 } |
660 | 680 |
661 return render_view->CreatePlugin(frame, plugin, params); | 681 return render_view->CreatePlugin(frame, plugin, params); |
662 } | 682 } |
663 case ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported: { | 683 case ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported: { |
664 RenderThread::Get()->RecordUserMetrics("Plugin_NPAPINotSupported"); | 684 RenderThread::Get()->RecordUserMetrics("Plugin_NPAPINotSupported"); |
665 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 685 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
666 render_view, frame, params, plugin, identifier, group_name, | 686 render_view, |
| 687 frame, |
| 688 params, |
| 689 plugin, |
| 690 identifier, |
| 691 group_name, |
667 IDR_BLOCKED_PLUGIN_HTML, | 692 IDR_BLOCKED_PLUGIN_HTML, |
668 l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_SUPPORTED_METRO)); | 693 l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_SUPPORTED_METRO)); |
669 render_view->Send(new ChromeViewHostMsg_NPAPINotSupported( | 694 render_view->Send(new ChromeViewHostMsg_NPAPINotSupported( |
670 render_view->GetRoutingID(), identifier)); | 695 render_view->GetRoutingID(), identifier)); |
671 break; | 696 break; |
672 } | 697 } |
673 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { | 698 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { |
674 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, | 699 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, |
675 url); | 700 url); |
676 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 701 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
677 render_view, frame, params, plugin, identifier, group_name, | 702 render_view, |
| 703 frame, |
| 704 params, |
| 705 plugin, |
| 706 identifier, |
| 707 group_name, |
678 IDR_DISABLED_PLUGIN_HTML, | 708 IDR_DISABLED_PLUGIN_HTML, |
679 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); | 709 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); |
680 break; | 710 break; |
681 } | 711 } |
682 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { | 712 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { |
683 #if defined(ENABLE_PLUGIN_INSTALLATION) | 713 #if defined(ENABLE_PLUGIN_INSTALLATION) |
684 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 714 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
685 render_view, frame, params, plugin, identifier, group_name, | 715 render_view, |
| 716 frame, |
| 717 params, |
| 718 plugin, |
| 719 identifier, |
| 720 group_name, |
686 IDR_BLOCKED_PLUGIN_HTML, | 721 IDR_BLOCKED_PLUGIN_HTML, |
687 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); | 722 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); |
688 placeholder->set_allow_loading(true); | 723 placeholder->set_allow_loading(true); |
689 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( | 724 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( |
690 render_view->GetRoutingID(), placeholder->CreateRoutingId(), | 725 render_view->GetRoutingID(), placeholder->CreateRoutingId(), |
691 identifier)); | 726 identifier)); |
692 #else | 727 #else |
693 NOTREACHED(); | 728 NOTREACHED(); |
694 #endif | 729 #endif |
695 break; | 730 break; |
696 } | 731 } |
697 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: { | 732 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: { |
698 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 733 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
699 render_view, frame, params, plugin, identifier, group_name, | 734 render_view, |
| 735 frame, |
| 736 params, |
| 737 plugin, |
| 738 identifier, |
| 739 group_name, |
700 IDR_BLOCKED_PLUGIN_HTML, | 740 IDR_BLOCKED_PLUGIN_HTML, |
701 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); | 741 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); |
702 break; | 742 break; |
703 } | 743 } |
704 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: { | 744 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: { |
705 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 745 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
706 render_view, frame, params, plugin, identifier, group_name, | 746 render_view, |
| 747 frame, |
| 748 params, |
| 749 plugin, |
| 750 identifier, |
| 751 group_name, |
707 IDR_BLOCKED_PLUGIN_HTML, | 752 IDR_BLOCKED_PLUGIN_HTML, |
708 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); | 753 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); |
709 placeholder->set_allow_loading(true); | 754 placeholder->set_allow_loading(true); |
710 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( | 755 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( |
711 render_view->GetRoutingID(), | 756 render_view->GetRoutingID(), |
712 group_name, | 757 group_name, |
713 identifier)); | 758 identifier)); |
714 break; | 759 break; |
715 } | 760 } |
716 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { | 761 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { |
717 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 762 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
718 render_view, frame, params, plugin, identifier, group_name, | 763 render_view, |
| 764 frame, |
| 765 params, |
| 766 plugin, |
| 767 identifier, |
| 768 group_name, |
719 IDR_CLICK_TO_PLAY_PLUGIN_HTML, | 769 IDR_CLICK_TO_PLAY_PLUGIN_HTML, |
720 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); | 770 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); |
721 placeholder->set_allow_loading(true); | 771 placeholder->set_allow_loading(true); |
722 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay"); | 772 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay"); |
723 observer->DidBlockContentType(content_type, identifier); | 773 observer->DidBlockContentType(content_type, identifier); |
724 break; | 774 break; |
725 } | 775 } |
726 case ChromeViewHostMsg_GetPluginInfo_Status::kBlocked: { | 776 case ChromeViewHostMsg_GetPluginInfo_Status::kBlocked: { |
727 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 777 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
728 render_view, frame, params, plugin, identifier, group_name, | 778 render_view, |
| 779 frame, |
| 780 params, |
| 781 plugin, |
| 782 identifier, |
| 783 group_name, |
729 IDR_BLOCKED_PLUGIN_HTML, | 784 IDR_BLOCKED_PLUGIN_HTML, |
730 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); | 785 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
731 placeholder->set_allow_loading(true); | 786 placeholder->set_allow_loading(true); |
732 RenderThread::Get()->RecordUserMetrics("Plugin_Blocked"); | 787 RenderThread::Get()->RecordUserMetrics("Plugin_Blocked"); |
733 observer->DidBlockContentType(content_type, identifier); | 788 observer->DidBlockContentType(content_type, identifier); |
734 break; | 789 break; |
735 } | 790 } |
736 } | 791 } |
737 } | 792 } |
738 placeholder->SetStatus(status); | 793 placeholder->SetStatus(status); |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 // SiteIsolationPolicy is off by default. We would like to activate cross-site | 1391 // SiteIsolationPolicy is off by default. We would like to activate cross-site |
1337 // document blocking (for UMA data collection) for normal renderer processes | 1392 // document blocking (for UMA data collection) for normal renderer processes |
1338 // running a normal web page from the Internet. We only turn on | 1393 // running a normal web page from the Internet. We only turn on |
1339 // SiteIsolationPolicy for a renderer process that does not have the extension | 1394 // SiteIsolationPolicy for a renderer process that does not have the extension |
1340 // flag on. | 1395 // flag on. |
1341 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1396 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1342 return !command_line->HasSwitch(switches::kExtensionProcess); | 1397 return !command_line->HasSwitch(switches::kExtensionProcess); |
1343 } | 1398 } |
1344 | 1399 |
1345 } // namespace chrome | 1400 } // namespace chrome |
OLD | NEW |