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

Unified Diff: base/callback_unittest.cc

Issue 2344143002: Add const to BindStateBase to align RefCounted constness (Closed)
Patch Set: Created 4 years, 3 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
« base/callback_internal.h ('K') | « base/callback_internal.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_unittest.cc
diff --git a/base/callback_unittest.cc b/base/callback_unittest.cc
index ad0430f247f381702644a629002e55e770852728..783f3bad4f5fb90e70cc6d9e0df0b08411a4c5e9 100644
--- a/base/callback_unittest.cc
+++ b/base/callback_unittest.cc
@@ -25,8 +25,8 @@ struct FakeBindState1 : internal::BindStateBase {
FakeBindState1() : BindStateBase(&NopInvokeFunc, &Destroy, &IsCancelled) {}
private:
~FakeBindState1() {}
- static void Destroy(internal::BindStateBase* self) {
- delete static_cast<FakeBindState1*>(self);
+ static void Destroy(const internal::BindStateBase* self) {
+ delete static_cast<const FakeBindState1*>(self);
}
static bool IsCancelled(const internal::BindStateBase*) {
return false;
@@ -37,8 +37,8 @@ struct FakeBindState2 : internal::BindStateBase {
FakeBindState2() : BindStateBase(&NopInvokeFunc, &Destroy, &IsCancelled) {}
private:
~FakeBindState2() {}
- static void Destroy(internal::BindStateBase* self) {
- delete static_cast<FakeBindState2*>(self);
+ static void Destroy(const internal::BindStateBase* self) {
+ delete static_cast<const FakeBindState2*>(self);
}
static bool IsCancelled(const internal::BindStateBase*) {
return false;
« base/callback_internal.h ('K') | « base/callback_internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698