Index: content/ppapi_plugin/broker_process_dispatcher.cc |
diff --git a/content/ppapi_plugin/broker_process_dispatcher.cc b/content/ppapi_plugin/broker_process_dispatcher.cc |
index 26a71007769c251099a2a35c68f99359f2a1909b..6fce803b636ff897ad308540d027b54622b50a02 100644 |
--- a/content/ppapi_plugin/broker_process_dispatcher.cc |
+++ b/content/ppapi_plugin/broker_process_dispatcher.cc |
@@ -4,18 +4,12 @@ |
#include "content/ppapi_plugin/broker_process_dispatcher.h" |
+#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "content/common/child_process.h" |
namespace { |
-class BrokerReleaseTask : public Task { |
- public: |
- void Run() { |
- DVLOG(1) << "BrokerReleaseTask::Run()"; |
- ChildProcess::current()->ReleaseProcess(); |
- } |
-}; |
- |
// How long we wait before releasing the broker process. |
const int kBrokerReleaseTimeMs = 30 * 1000; // 30 seconds. |
@@ -36,6 +30,9 @@ BrokerProcessDispatcher::~BrokerProcessDispatcher() { |
// 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 BrokerReleaseTask(), |
- kBrokerReleaseTimeMs); |
+ MessageLoop::current()->PostDelayedTask( |
+ FROM_HERE, |
+ base::Bind(&ChildProcess::ReleaseProcess, |
+ base::Unretained(ChildProcess::current())), |
+ kBrokerReleaseTimeMs); |
} |