| OLD | NEW |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 bool PluginService::enable_chrome_plugins_ = true; | 61 bool PluginService::enable_chrome_plugins_ = true; |
| 62 | 62 |
| 63 // static | 63 // static |
| 64 void PluginService::InitGlobalInstance(Profile* profile) { | 64 void PluginService::InitGlobalInstance(Profile* profile) { |
| 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 66 | 66 |
| 67 // We first group the plugins and then figure out which groups to disable. | 67 // We first group the plugins and then figure out which groups to disable. |
| 68 PluginUpdater::GetPluginUpdater()->DisablePluginGroupsFromPrefs(profile); | 68 PluginUpdater::GetInstance()->DisablePluginGroupsFromPrefs(profile); |
| 69 | 69 |
| 70 if (CommandLine::ForCurrentProcess()->HasSwitch( | 70 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 71 switches::kDisableOutdatedPlugins)) { | 71 switches::kDisableOutdatedPlugins)) { |
| 72 NPAPI::PluginList::Singleton()->DisableOutdatedPluginGroups(); | 72 NPAPI::PluginList::Singleton()->DisableOutdatedPluginGroups(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Have Chrome plugins write their data to the profile directory. | 75 // Have Chrome plugins write their data to the profile directory. |
| 76 GetInstance()->SetChromePluginDataDir(profile->GetPath()); | 76 GetInstance()->SetChromePluginDataDir(profile->GetPath()); |
| 77 } | 77 } |
| 78 | 78 |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); | 424 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); |
| 425 | 425 |
| 426 // These NPAPI entry points will never be called. TODO(darin): Come up | 426 // These NPAPI entry points will never be called. TODO(darin): Come up |
| 427 // with a cleaner way to register pepper plugins with the NPAPI PluginList, | 427 // with a cleaner way to register pepper plugins with the NPAPI PluginList, |
| 428 // or perhaps refactor the PluginList to be less specific to NPAPI. | 428 // or perhaps refactor the PluginList to be less specific to NPAPI. |
| 429 memset(&info.entry_points, 0, sizeof(info.entry_points)); | 429 memset(&info.entry_points, 0, sizeof(info.entry_points)); |
| 430 | 430 |
| 431 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); | 431 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); |
| 432 } | 432 } |
| 433 } | 433 } |
| OLD | NEW |