Remove deprecated base::Bind APIs (see issue #3140)

This CL removes the following deprecated APIs:

- base::Bind()
- base::Callback
- base::Closure
- base::CancelableCallback
- base::CancelableClosure

The behavior that these APIs provided is still available using the *Repeating*
variants. However, consider strongly whether using these variants is actually
necessary in your case or whether the *Once* variants will suffice: unless your
callback *objects* (note: not variables!) need to be called multiple times,
they most likely can and should be the Once variants.

This applies the same changes as https://crrev.com/6cc94b5339.
This commit is contained in:
Marshall Greenblatt
2021-10-05 15:08:43 +03:00
parent f3ed6619da
commit 07bc800f00
4 changed files with 5 additions and 38 deletions

View File

@ -83,10 +83,10 @@
#include "include/base/cef_bind.h"
#include "include/base/cef_callback.h"
#include "include/base/internal/cef_callback_internal.h"
#include "include/base/cef_logging.h"
#include "include/base/cef_compiler_specific.h"
#include "include/base/cef_logging.h"
#include "include/base/cef_weak_ptr.h"
#include "include/base/internal/cef_callback_internal.h"
namespace base {
namespace internal {
@ -113,9 +113,7 @@ class CancelableCallbackImpl {
}
// Returns true if the wrapped callback has been cancelled.
bool IsCancelled() const {
return callback_.is_null();
}
bool IsCancelled() const { return callback_.is_null(); }
// Sets |callback| as the closure that may be cancelled. |callback| may not
// be null. Outstanding and any previously wrapped callbacks are cancelled.
@ -180,10 +178,6 @@ using CancelableRepeatingCallback =
internal::CancelableCallbackImpl<RepeatingCallback<Signature>>;
using CancelableRepeatingClosure = CancelableRepeatingCallback<void()>;
template <typename Signature>
using CancelableCallback = CancelableRepeatingCallback<Signature>;
using CancelableClosure = CancelableCallback<void()>;
} // namespace base
#endif // !USING_CHROMIUM_INCLUDES