| Index: chrome/browser/plugin_service.cc
|
| diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
|
| index b7f0489569c06148ed64ed188745c38af27fa9d6..9cb30199f5c4c84ebb3e3eb20681b7fa47c303d2 100644
|
| --- a/chrome/browser/plugin_service.cc
|
| +++ b/chrome/browser/plugin_service.cc
|
| @@ -62,6 +62,11 @@ void PluginService::InitGlobalInstance(Profile* profile) {
|
| // We first group the plugins and then figure out which groups to disable.
|
| plugin_updater::DisablePluginGroupsFromPrefs(profile);
|
|
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableOutdatedPlugins)) {
|
| + plugin_updater::DisableOutdatedPluginGroups();
|
| + }
|
| +
|
| // Have Chrome plugins write their data to the profile directory.
|
| GetInstance()->SetChromePluginDataDir(profile->GetPath());
|
| }
|
| @@ -229,10 +234,13 @@ void PluginService::OpenChannelToPlugin(
|
| const std::wstring& locale,
|
| IPC::Message* reply_msg) {
|
| DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
|
| - // We don't need a policy URL here because that was already checked by a
|
| - // previous call to GetPluginPath.
|
| - GURL policy_url;
|
| - FilePath plugin_path = GetPluginPath(url, policy_url, mime_type, NULL);
|
| + bool allow_wildcard = true;
|
| + WebPluginInfo info;
|
| + FilePath plugin_path;
|
| + if (NPAPI::PluginList::Singleton()->GetPluginInfo(
|
| + url, mime_type, allow_wildcard, &info, NULL) && info.enabled) {
|
| + plugin_path = info.path;
|
| + }
|
| PluginProcessHost* plugin_host = FindOrStartPluginProcess(plugin_path);
|
| if (plugin_host) {
|
| plugin_host->OpenChannelToPlugin(renderer_msg_filter, mime_type, reply_msg);
|
| @@ -242,21 +250,6 @@ void PluginService::OpenChannelToPlugin(
|
| }
|
| }
|
|
|
| -FilePath PluginService::GetPluginPath(const GURL& url,
|
| - const GURL& policy_url,
|
| - const std::string& mime_type,
|
| - std::string* actual_mime_type) {
|
| - bool allow_wildcard = true;
|
| - WebPluginInfo info;
|
| - if (NPAPI::PluginList::Singleton()->GetPluginInfo(
|
| - url, mime_type, allow_wildcard, &info, actual_mime_type) &&
|
| - info.enabled && PluginAllowedForURL(info.path, policy_url)) {
|
| - return info.path;
|
| - }
|
| -
|
| - return FilePath();
|
| -}
|
| -
|
| static void PurgePluginListCache(bool reload_pages) {
|
| for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator();
|
| !it.IsAtEnd(); it.Advance()) {
|
| @@ -337,8 +330,8 @@ void PluginService::Observe(NotificationType type,
|
| }
|
| }
|
|
|
| -bool PluginService::PluginAllowedForURL(const FilePath& plugin_path,
|
| - const GURL& url) {
|
| +bool PluginService::PrivatePluginAllowedForURL(const FilePath& plugin_path,
|
| + const GURL& url) {
|
| if (url.is_empty())
|
| return true; // Caller wants all plugins.
|
|
|
|
|