diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 02:28:05 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 02:28:05 +0000 |
commit | 857aeb5d22d9b46950f5d4ac8020dab72ccf6a0c (patch) | |
tree | 7c98a6c3b45cd8b9f31dfac06dec68535afb8ad2 | |
parent | 366ae2448ddfcd11eb827205aa56c8c0c00442bb (diff) | |
download | chromium_src-857aeb5d22d9b46950f5d4ac8020dab72ccf6a0c.zip chromium_src-857aeb5d22d9b46950f5d4ac8020dab72ccf6a0c.tar.gz chromium_src-857aeb5d22d9b46950f5d4ac8020dab72ccf6a0c.tar.bz2 |
Remove cancel from RunnableFunctions.
BUG=NONE
TEST=BUILD
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84060
Review URL: http://codereview.chromium.org/6690031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84740 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/task.h | 51 | ||||
-rw-r--r-- | remoting/client/chromoting_client.cc | 2 | ||||
-rw-r--r-- | remoting/client/chromoting_client.h | 6 |
3 files changed, 23 insertions, 36 deletions
diff --git a/base/task.h b/base/task.h index 8030169..643e418 100644 --- a/base/task.h +++ b/base/task.h @@ -442,7 +442,7 @@ inline CancelableTask* NewRunnableMethod(T* object, Method method, // RunnableFunction and NewRunnableFunction implementation --------------------- template <class Function, class Params> -class RunnableFunction : public CancelableTask { +class RunnableFunction : public Task { public: RunnableFunction(Function function, const Params& params) : function_(function), params_(params) { @@ -459,53 +459,45 @@ class RunnableFunction : public CancelableTask { DispatchToFunction(function_, params_); } - virtual void Cancel() { - } - private: Function function_; Params params_; }; template <class Function> -inline CancelableTask* NewRunnableFunction(Function function) { +inline Task* NewRunnableFunction(Function function) { return new RunnableFunction<Function, Tuple0>(function, MakeTuple()); } template <class Function, class A> -inline CancelableTask* NewRunnableFunction(Function function, const A& a) { +inline Task* NewRunnableFunction(Function function, const A& a) { return new RunnableFunction<Function, Tuple1<A> >(function, MakeTuple(a)); } template <class Function, class A, class B> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b) { return new RunnableFunction<Function, Tuple2<A, B> >(function, MakeTuple(a, b)); } template <class Function, class A, class B, class C> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c) { return new RunnableFunction<Function, Tuple3<A, B, C> >(function, MakeTuple(a, b, c)); } template <class Function, class A, class B, class C, class D> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c, const D& d) { return new RunnableFunction<Function, Tuple4<A, B, C, D> >(function, MakeTuple(a, b, c, d)); } template <class Function, class A, class B, class C, class D, class E> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c, const D& d, const E& e) { return new RunnableFunction<Function, Tuple5<A, B, C, D, E> >(function, MakeTuple(a, b, c, d, @@ -514,32 +506,27 @@ inline CancelableTask* NewRunnableFunction(Function function, template <class Function, class A, class B, class C, class D, class E, class F> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e, const F& f) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c, const D& d, const E& e, + const F& f) { return new RunnableFunction<Function, Tuple6<A, B, C, D, E, F> >(function, MakeTuple(a, b, c, d, e, f)); } template <class Function, class A, class B, class C, class D, class E, class F, class G> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e, const F& f, - const G& g) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c, const D& d, const E& e, const F& f, + const G& g) { return new RunnableFunction<Function, Tuple7<A, B, C, D, E, F, G> >(function, MakeTuple(a, b, c, d, e, f, g)); } template <class Function, class A, class B, class C, class D, class E, class F, class G, class H> -inline CancelableTask* NewRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e, const F& f, - const G& g, const H& h) { +inline Task* NewRunnableFunction(Function function, const A& a, const B& b, + const C& c, const D& d, const E& e, const F& f, + const G& g, const H& h) { return new RunnableFunction<Function, Tuple8<A, B, C, D, E, F, G, H> >( function, MakeTuple(a, b, c, d, e, f, g, h)); } diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc index 3836776..72cf9f1 100644 --- a/remoting/client/chromoting_client.cc +++ b/remoting/client/chromoting_client.cc @@ -21,7 +21,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config, ChromotingView* view, RectangleUpdateDecoder* rectangle_decoder, InputHandler* input_handler, - CancelableTask* client_done) + Task* client_done) : config_(config), context_(context), connection_(connection), diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index fb785d7..ced3be7 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -45,7 +45,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, ChromotingView* view, RectangleUpdateDecoder* rectangle_decoder, InputHandler* input_handler, - CancelableTask* client_done); + Task* client_done); virtual ~ChromotingClient(); void Start(); @@ -119,7 +119,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, InputHandler* input_handler_; // If non-NULL, this is called when the client is done. - CancelableTask* client_done_; + Task* client_done_; ConnectionState state_; |