summaryrefslogtreecommitdiffstats
path: root/net/base/completion_callback.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
commitf1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch)
tree6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /net/base/completion_callback.h
parentd1666539b57bf8552e203d355fd09909d36f9732 (diff)
downloadchromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2
Begin CompletionCallback switchover.
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/completion_callback.h')
-rw-r--r--net/base/completion_callback.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/base/completion_callback.h b/net/base/completion_callback.h
index 23d0166..1d3e551 100644
--- a/net/base/completion_callback.h
+++ b/net/base/completion_callback.h
@@ -12,31 +12,31 @@ namespace net {
// A callback specialization that takes a single int parameter. Usually this
// is used to report a byte count or network error code.
-typedef Callback1<int>::Type CompletionCallback;
+typedef Callback1<int>::Type OldCompletionCallback;
-// Used to implement a CompletionCallback.
+// Used to implement a OldCompletionCallback.
template <class T>
-class CompletionCallbackImpl :
+class OldCompletionCallbackImpl :
public CallbackImpl< T, void (T::*)(int), Tuple1<int> > {
public:
- CompletionCallbackImpl(T* obj, void (T::* meth)(int))
+ OldCompletionCallbackImpl(T* obj, void (T::* meth)(int))
: CallbackImpl< T, void (T::*)(int),
Tuple1<int> >::CallbackImpl(obj, meth) {
}
};
-// CancelableCompletionCallback is used for completion callbacks
+// CancelableOldCompletionCallback is used for completion callbacks
// which may outlive the target for the method dispatch. In such a case, the
// provider of the callback calls Cancel() to mark the callback as
// "canceled". When the canceled callback is eventually run it does nothing
// other than to decrement the refcount to 0 and free the memory.
template <class T>
-class CancelableCompletionCallback :
- public CompletionCallbackImpl<T>,
- public base::RefCounted<CancelableCompletionCallback<T> > {
+class CancelableOldCompletionCallback :
+ public OldCompletionCallbackImpl<T>,
+ public base::RefCounted<CancelableOldCompletionCallback<T> > {
public:
- CancelableCompletionCallback(T* obj, void (T::* meth)(int))
- : CompletionCallbackImpl<T>(obj, meth), is_canceled_(false) {
+ CancelableOldCompletionCallback(T* obj, void (T::* meth)(int))
+ : OldCompletionCallbackImpl<T>(obj, meth), is_canceled_(false) {
}
void Cancel() {
@@ -45,9 +45,9 @@ class CancelableCompletionCallback :
virtual void RunWithParams(const Tuple1<int>& params) {
if (is_canceled_) {
- base::RefCounted<CancelableCompletionCallback<T> >::Release();
+ base::RefCounted<CancelableOldCompletionCallback<T> >::Release();
} else {
- CompletionCallbackImpl<T>::RunWithParams(params);
+ OldCompletionCallbackImpl<T>::RunWithParams(params);
}
}