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

Side by Side Diff: chrome/browser/plugin_service.cc

Issue 2858035: Modify NPAPI::PluginList::GetPluginInfo() to return true also for disabled plugins. (Closed)
Patch Set: Created 10 years, 5 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/plugin_service.h" 7 #include "chrome/browser/plugin_service.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 } 242 }
243 243
244 FilePath PluginService::GetPluginPath(const GURL& url, 244 FilePath PluginService::GetPluginPath(const GURL& url,
245 const GURL& policy_url, 245 const GURL& policy_url,
246 const std::string& mime_type, 246 const std::string& mime_type,
247 std::string* actual_mime_type) { 247 std::string* actual_mime_type) {
248 bool allow_wildcard = true; 248 bool allow_wildcard = true;
249 WebPluginInfo info; 249 WebPluginInfo info;
250 if (NPAPI::PluginList::Singleton()->GetPluginInfo( 250 if (NPAPI::PluginList::Singleton()->GetPluginInfo(
251 url, mime_type, allow_wildcard, &info, actual_mime_type) && 251 url, mime_type, allow_wildcard, &info, actual_mime_type) &&
252 PluginAllowedForURL(info.path, policy_url)) { 252 info.enabled && PluginAllowedForURL(info.path, policy_url)) {
253 return info.path; 253 return info.path;
254 } 254 }
255 255
256 return FilePath(); 256 return FilePath();
257 } 257 }
258 258
259 static void PurgePluginListCache(bool reload_pages) { 259 static void PurgePluginListCache(bool reload_pages) {
260 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); 260 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator();
261 !it.IsAtEnd(); it.Advance()) { 261 !it.IsAtEnd(); it.Advance()) {
262 it.GetCurrentValue()->Send(new ViewMsg_PurgePluginListCache(reload_pages)); 262 it.GetCurrentValue()->Send(new ViewMsg_PurgePluginListCache(reload_pages));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); 362 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|'));
363 363
364 // These NPAPI entry points will never be called. TODO(darin): Come up 364 // These NPAPI entry points will never be called. TODO(darin): Come up
365 // with a cleaner way to register pepper plugins with the NPAPI PluginList, 365 // with a cleaner way to register pepper plugins with the NPAPI PluginList,
366 // or perhaps refactor the PluginList to be less specific to NPAPI. 366 // or perhaps refactor the PluginList to be less specific to NPAPI.
367 memset(&info.entry_points, 0, sizeof(info.entry_points)); 367 memset(&info.entry_points, 0, sizeof(info.entry_points));
368 368
369 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); 369 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info);
370 } 370 }
371 } 371 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/buffered_resource_handler.cc » ('j') | webkit/glue/plugins/plugin_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698