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

Side by Side Diff: content/browser/plugin_service_impl.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 | « content/browser/plugin_service_impl.h ('k') | content/common/frame_messages.h » ('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 "content/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 bool use_stale = false; 235 bool use_stale = false;
236 PluginList::Singleton()->GetPluginInfoArray( 236 PluginList::Singleton()->GetPluginInfoArray(
237 url, mime_type, allow_wildcard, &use_stale, plugins, actual_mime_types); 237 url, mime_type, allow_wildcard, &use_stale, plugins, actual_mime_types);
238 return use_stale; 238 return use_stale;
239 } 239 }
240 240
241 bool PluginServiceImpl::GetPluginInfo(int render_process_id, 241 bool PluginServiceImpl::GetPluginInfo(int render_process_id,
242 int render_frame_id, 242 int render_frame_id,
243 ResourceContext* context, 243 ResourceContext* context,
244 const GURL& url, 244 const GURL& url,
245 const GURL& page_url, 245 const url::Origin& main_frame_origin,
246 const std::string& mime_type, 246 const std::string& mime_type,
247 bool allow_wildcard, 247 bool allow_wildcard,
248 bool* is_stale, 248 bool* is_stale,
249 WebPluginInfo* info, 249 WebPluginInfo* info,
250 std::string* actual_mime_type) { 250 std::string* actual_mime_type) {
251 std::vector<WebPluginInfo> plugins; 251 std::vector<WebPluginInfo> plugins;
252 std::vector<std::string> mime_types; 252 std::vector<std::string> mime_types;
253 bool stale = GetPluginInfoArray( 253 bool stale = GetPluginInfoArray(
254 url, mime_type, allow_wildcard, &plugins, &mime_types); 254 url, mime_type, allow_wildcard, &plugins, &mime_types);
255 if (is_stale) 255 if (is_stale)
256 *is_stale = stale; 256 *is_stale = stale;
257 257
258 for (size_t i = 0; i < plugins.size(); ++i) { 258 for (size_t i = 0; i < plugins.size(); ++i) {
259 if (!filter_ || filter_->IsPluginAvailable(render_process_id, 259 if (!filter_ ||
260 render_frame_id, 260 filter_->IsPluginAvailable(render_process_id, render_frame_id, context,
261 context, 261 url, main_frame_origin, &plugins[i])) {
262 url,
263 page_url,
264 &plugins[i])) {
265 *info = plugins[i]; 262 *info = plugins[i];
266 if (actual_mime_type) 263 if (actual_mime_type)
267 *actual_mime_type = mime_types[i]; 264 *actual_mime_type = mime_types[i];
268 return true; 265 return true;
269 } 266 }
270 } 267 }
271 return false; 268 return false;
272 } 269 }
273 270
274 bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path, 271 bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 414 }
418 415
419 bool PluginServiceImpl::PpapiDevChannelSupported( 416 bool PluginServiceImpl::PpapiDevChannelSupported(
420 BrowserContext* browser_context, 417 BrowserContext* browser_context,
421 const GURL& document_url) { 418 const GURL& document_url) {
422 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( 419 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs(
423 browser_context, document_url); 420 browser_context, document_url);
424 } 421 }
425 422
426 } // namespace content 423 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_service_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698