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

Unified Diff: content/ppapi_plugin/plugin_process_dispatcher.cc

Issue 8879003: Remove custom Task implementations from content/ppapi_plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « content/ppapi_plugin/broker_process_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/plugin_process_dispatcher.cc
diff --git a/content/ppapi_plugin/plugin_process_dispatcher.cc b/content/ppapi_plugin/plugin_process_dispatcher.cc
index 0243100ede23def13d11cd8f56026e4ff82c9157..1ac23d14795e783679d3ffc559d74fe5d0252411 100644
--- a/content/ppapi_plugin/plugin_process_dispatcher.cc
+++ b/content/ppapi_plugin/plugin_process_dispatcher.cc
@@ -4,17 +4,12 @@
#include "content/ppapi_plugin/plugin_process_dispatcher.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "content/common/child_process.h"
namespace {
-class PluginReleaseTask : public Task {
- public:
- void Run() {
- ChildProcess::current()->ReleaseProcess();
- }
-};
-
// How long we wait before releasing the plugin process.
const int kPluginReleaseTimeMs = 30 * 1000; // 30 seconds.
@@ -33,6 +28,9 @@ PluginProcessDispatcher::~PluginProcessDispatcher() {
// plugin. This is the case for common plugins where they may be used on a
// source and destination page of a navigation. We don't want to tear down
// and re-start processes each time in these cases.
- MessageLoop::current()->PostDelayedTask(FROM_HERE, new PluginReleaseTask(),
- kPluginReleaseTimeMs);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&ChildProcess::ReleaseProcess,
+ base::Unretained(ChildProcess::current())),
+ kPluginReleaseTimeMs);
}
« no previous file with comments | « content/ppapi_plugin/broker_process_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698