| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 case ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy: { | 839 case ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy: { |
| 840 placeholder = create_blocked_plugin( | 840 placeholder = create_blocked_plugin( |
| 841 IDR_BLOCKED_PLUGIN_HTML, | 841 IDR_BLOCKED_PLUGIN_HTML, |
| 842 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_BY_POLICY, | 842 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_BY_POLICY, |
| 843 group_name)); | 843 group_name)); |
| 844 RenderThread::Get()->RecordAction( | 844 RenderThread::Get()->RecordAction( |
| 845 UserMetricsAction("Plugin_BlockedByPolicy")); | 845 UserMetricsAction("Plugin_BlockedByPolicy")); |
| 846 observer->DidBlockContentType(content_type, group_name); | 846 observer->DidBlockContentType(content_type, group_name); |
| 847 break; | 847 break; |
| 848 } | 848 } |
| 849 case ChromeViewHostMsg_GetPluginInfo_Status::kBlockedNoLoading: { |
| 850 placeholder = create_blocked_plugin( |
| 851 IDR_BLOCKED_PLUGIN_HTML, |
| 852 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, |
| 853 group_name)); |
| 854 observer->DidBlockContentType(content_type, group_name); |
| 855 break; |
| 856 } |
| 849 case ChromeViewHostMsg_GetPluginInfo_Status::kComponentUpdateRequired: { | 857 case ChromeViewHostMsg_GetPluginInfo_Status::kComponentUpdateRequired: { |
| 850 placeholder = create_blocked_plugin( | 858 placeholder = create_blocked_plugin( |
| 851 IDR_BLOCKED_PLUGIN_HTML, | 859 IDR_BLOCKED_PLUGIN_HTML, |
| 852 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); | 860 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); |
| 853 placeholder->AllowLoading(); | 861 placeholder->AllowLoading(); |
| 854 render_frame->Send(new ChromeViewHostMsg_BlockedComponentUpdatedPlugin( | 862 render_frame->Send(new ChromeViewHostMsg_BlockedComponentUpdatedPlugin( |
| 855 render_frame->GetRoutingID(), placeholder->CreateRoutingId(), | 863 render_frame->GetRoutingID(), placeholder->CreateRoutingId(), |
| 856 identifier)); | 864 identifier)); |
| 857 break; | 865 break; |
| 858 } | 866 } |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 | 1468 |
| 1461 url::Replacements<char> r; | 1469 url::Replacements<char> r; |
| 1462 r.SetPath(path.c_str(), url::Component(0, path.length())); | 1470 r.SetPath(path.c_str(), url::Component(0, path.length())); |
| 1463 | 1471 |
| 1464 if (result == internal::NUM_PLUGIN_ERROR) | 1472 if (result == internal::NUM_PLUGIN_ERROR) |
| 1465 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; | 1473 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; |
| 1466 | 1474 |
| 1467 RecordYouTubeRewriteUMA(result); | 1475 RecordYouTubeRewriteUMA(result); |
| 1468 return corrected_url.ReplaceComponents(r); | 1476 return corrected_url.ReplaceComponents(r); |
| 1469 } | 1477 } |
| OLD | NEW |