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

Unified Diff: remoting/base/plugin_message_loop_proxy.cc

Issue 9086002: base::Bind: Remove Task. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix. Created 8 years, 12 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 | « remoting/base/plugin_message_loop_proxy.h ('k') | remoting/jingle_glue/jingle_thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/plugin_message_loop_proxy.cc
diff --git a/remoting/base/plugin_message_loop_proxy.cc b/remoting/base/plugin_message_loop_proxy.cc
index 3a8b48eb1a1f5751ab9458c6cfbdbdd8a2d164c1..d5f051dbc4009ef6c3e6afa2d112a2f086c0e39e 100644
--- a/remoting/base/plugin_message_loop_proxy.cc
+++ b/remoting/base/plugin_message_loop_proxy.cc
@@ -24,42 +24,6 @@ void PluginMessageLoopProxy::Detach() {
}
}
-// MessageLoopProxy interface implementation.
-bool PluginMessageLoopProxy::PostTask(
- const tracked_objects::Location& from_here,
- Task* task) {
- return PostDelayedTask(from_here, task, 0);
-}
-
-bool PluginMessageLoopProxy::PostDelayedTask(
- const tracked_objects::Location& from_here,
- Task* task,
- int64 delay_ms) {
- base::AutoLock auto_lock(lock_);
- if (!delegate_)
- return false;
-
- base::Closure* springpad_closure = new base::Closure(base::Bind(
- &PluginMessageLoopProxy::RunTaskIf, this, task));
- return delegate_->RunOnPluginThread(
- delay_ms, &PluginMessageLoopProxy::TaskSpringboard, springpad_closure);
-}
-
-bool PluginMessageLoopProxy::PostNonNestableTask(
- const tracked_objects::Location& from_here,
- Task* task) {
- // All tasks running on this message loop are non-nestable.
- return PostTask(from_here, task);
-}
-
-bool PluginMessageLoopProxy::PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- Task* task,
- int64 delay_ms) {
- // All tasks running on this message loop are non-nestable.
- return PostDelayedTask(from_here, task, delay_ms);
-}
-
bool PluginMessageLoopProxy::PostTask(
const tracked_objects::Location& from_here,
const base::Closure& task) {
@@ -97,7 +61,7 @@ bool PluginMessageLoopProxy::PostNonNestableDelayedTask(
bool PluginMessageLoopProxy::BelongsToCurrentThread() {
// In pepper plugins ideally we should use pp::Core::IsMainThread,
- // but it is problematic becase we would need to keep reference to
+ // but it is problematic because we would need to keep reference to
// Core somewhere, e.g. make the delegate ref-counted.
return base::PlatformThread::CurrentId() == plugin_thread_id_;
}
@@ -109,15 +73,6 @@ void PluginMessageLoopProxy::TaskSpringboard(void* data) {
delete task;
}
-void PluginMessageLoopProxy::RunTaskIf(Task* task) {
- DCHECK(BelongsToCurrentThread());
- // |delegate_| can be changed only from our thread, so it's safe to
- // access it without acquiring |lock_|.
- if (delegate_)
- task->Run();
- delete task;
-}
-
void PluginMessageLoopProxy::RunClosureIf(const base::Closure& task) {
// |delegate_| can be changed only from our thread, so it's safe to
// access it without acquiring |lock_|.
« no previous file with comments | « remoting/base/plugin_message_loop_proxy.h ('k') | remoting/jingle_glue/jingle_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698