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

Unified Diff: chrome/browser/component_updater/npapi_flash_component_installer.cc

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/gview_request_interceptor_unittest.cc ('k') | chrome/browser/plugin_data_remover.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/npapi_flash_component_installer.cc
diff --git a/chrome/browser/component_updater/npapi_flash_component_installer.cc b/chrome/browser/component_updater/npapi_flash_component_installer.cc
index fd0be6026e2840250b2b3a7e13b52384eb1cd3c5..75fa40520f5c2b5c261a476a79c94acccd78a261 100644
--- a/chrome/browser/component_updater/npapi_flash_component_installer.cc
+++ b/chrome/browser/component_updater/npapi_flash_component_installer.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/component_updater/flash_component_installer.h"
+#include "base/bind.h"
#include "base/base_paths.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
@@ -16,7 +17,9 @@
#include "chrome/browser/plugin_prefs.h"
#include "chrome/common/chrome_paths.h"
#include "content/browser/browser_thread.h"
+#include "content/browser/plugin_service.h"
#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/webplugininfo.h"
namespace {
@@ -133,9 +136,8 @@ void FinishFlashUpdateRegistration(ComponentUpdateService* cus,
// chrome is using and what is its version. This will determine if we register
// for component update or not. Read the comments on RegisterNPAPIFlashComponent
// for more background.
-void StartFlashUpdateRegistration(ComponentUpdateService* cus) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-
+void StartFlashUpdateRegistration(ComponentUpdateService* cus,
+ const std::vector<webkit::WebPluginInfo>&) {
FilePath builtin_plugin_path;
if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_plugin_path))
return;
@@ -143,7 +145,7 @@ void StartFlashUpdateRegistration(ComponentUpdateService* cus) {
FilePath updated_plugin_path =
GetNPAPIFlashBaseDirectory().Append(kFlashPluginFileName);
- webkit::npapi::PluginList* plugins = webkit::npapi::PluginList::Singleton();
+ PluginService* plugins = PluginService::GetInstance();
webkit::WebPluginInfo plugin_info;
if (plugins->GetPluginInfoByPath(updated_plugin_path, &plugin_info)) {
@@ -165,7 +167,7 @@ void StartFlashUpdateRegistration(ComponentUpdateService* cus) {
}
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(&FinishFlashUpdateRegistration, cus, plugin_info));
+ base::Bind(&FinishFlashUpdateRegistration, cus, plugin_info));
}
// Here is the general plan of action: we are going to update flash and we have
@@ -205,7 +207,10 @@ void RegisterNPAPIFlashComponent(ComponentUpdateService* cus) {
plugins->AddExtraPluginPath(path);
plugins->RefreshPlugins();
- BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(&StartFlashUpdateRegistration, cus), 8000);
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::Bind(&PluginService::GetPlugins,
+ base::Unretained(PluginService::GetInstance()),
+ base::Bind(&StartFlashUpdateRegistration, cus)),
+ 8000);
#endif
}
« no previous file with comments | « chrome/browser/chromeos/gview_request_interceptor_unittest.cc ('k') | chrome/browser/plugin_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698