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

Unified Diff: net/base/completion_callback.h

Issue 8662047: base::Bind: Implement a 1-arity CancelableCallback and use this to implement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fixes. Created 9 years, 1 month 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 | « chrome/browser/renderer_host/offline_resource_handler.cc ('k') | webkit/appcache/appcache_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/completion_callback.h
diff --git a/net/base/completion_callback.h b/net/base/completion_callback.h
index 7474793acbdc77134433e150918a980b75ad2ca3..cea6be36cb980ff2631fbac7acda8593068f3bb6 100644
--- a/net/base/completion_callback.h
+++ b/net/base/completion_callback.h
@@ -8,6 +8,7 @@
#include "base/callback_old.h"
#include "base/callback.h"
+#include "base/cancelable_callback.h"
namespace net {
@@ -27,6 +28,8 @@ class OldCompletionCallbackImpl :
}
};
+typedef base::CancelableCallback<void(int)> CancelableCompletionCallback;
+
// 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
« no previous file with comments | « chrome/browser/renderer_host/offline_resource_handler.cc ('k') | webkit/appcache/appcache_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698