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

Unified Diff: base/callback_internal.h

Issue 2106773002: Remove `Runnable` concept from base/bind_internal.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +comment. fix spacing. Created 4 years, 6 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 | « base/bind_unittest.nc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_internal.h
diff --git a/base/callback_internal.h b/base/callback_internal.h
index 3e8e10f75c0b8a43b19bb61d4d5319b3211c6bf9..0fe0b2d9e198716690365dc8d6a4c82508a79188 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -64,6 +64,7 @@ class BASE_EXPORT CallbackBase<CopyMode::MoveOnly> {
// Returns true if Callback is null (doesn't refer to anything).
bool is_null() const { return bind_state_.get() == NULL; }
+ explicit operator bool() const { return !is_null(); }
// Returns the Callback into an uninitialized state.
void Reset();
« no previous file with comments | « base/bind_unittest.nc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698