Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2378573005: [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash. (Closed)
Patch Set: fix dat merge Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 #if defined(ENABLE_EXTENSIONS) 558 #if defined(ENABLE_EXTENSIONS)
559 if (!ChromeExtensionsRendererClient::GetInstance()->OverrideCreatePlugin( 559 if (!ChromeExtensionsRendererClient::GetInstance()->OverrideCreatePlugin(
560 render_frame, params)) { 560 render_frame, params)) {
561 return false; 561 return false;
562 } 562 }
563 #endif 563 #endif
564 564
565 GURL url(params.url); 565 GURL url(params.url);
566 #if defined(ENABLE_PLUGINS) 566 #if defined(ENABLE_PLUGINS)
567 ChromeViewHostMsg_GetPluginInfo_Output output; 567 ChromeViewHostMsg_GetPluginInfo_Output output;
568 WebString top_origin = frame->top()->getSecurityOrigin().toString();
569 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( 568 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo(
570 render_frame->GetRoutingID(), url, blink::WebStringToGURL(top_origin), 569 render_frame->GetRoutingID(), url, frame->top()->getSecurityOrigin(),
571 orig_mime_type, &output)); 570 orig_mime_type, &output));
572 *plugin = CreatePlugin(render_frame, frame, params, output); 571 *plugin = CreatePlugin(render_frame, frame, params, output);
573 #else // !defined(ENABLE_PLUGINS) 572 #else // !defined(ENABLE_PLUGINS)
574 573
575 #if defined(OS_ANDROID) 574 #if defined(OS_ANDROID)
576 if (plugins::MobileYouTubePlugin::IsYouTubeURL(url, orig_mime_type)) { 575 if (plugins::MobileYouTubePlugin::IsYouTubeURL(url, orig_mime_type)) {
577 base::StringPiece template_html( 576 base::StringPiece template_html(
578 ResourceBundle::GetSharedInstance().GetRawDataResource( 577 ResourceBundle::GetSharedInstance().GetRawDataResource(
579 IDR_MOBILE_YOUTUBE_PLUGIN_HTML)); 578 IDR_MOBILE_YOUTUBE_PLUGIN_HTML));
580 *plugin = (new plugins::MobileYouTubePlugin(render_frame, frame, params, 579 *plugin = (new plugins::MobileYouTubePlugin(render_frame, frame, params,
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 1470
1472 url::Replacements<char> r; 1471 url::Replacements<char> r;
1473 r.SetPath(path.c_str(), url::Component(0, path.length())); 1472 r.SetPath(path.c_str(), url::Component(0, path.length()));
1474 1473
1475 if (result == internal::NUM_PLUGIN_ERROR) 1474 if (result == internal::NUM_PLUGIN_ERROR)
1476 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1475 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1477 1476
1478 RecordYouTubeRewriteUMA(result); 1477 RecordYouTubeRewriteUMA(result);
1479 return corrected_url.ReplaceComponents(r); 1478 return corrected_url.ReplaceComponents(r);
1480 } 1479 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698