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

Unified Diff: base/callback_unittest.cc

Issue 8483003: Callback API Change: Reimplement Bind(); support IgnoreResult, full currying, and use less types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 | « base/callback_internal.cc ('k') | base/file_util_proxy.cc » ('j') | 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 713c9e48d5e2b70c593cc691ee0c8f4a4b205f72..33157aefbec8ec8fe1c3403ad651f19f62c7105f 100644
--- a/base/callback_unittest.cc
+++ b/base/callback_unittest.cc
@@ -23,21 +23,21 @@ class HelperObject {
};
struct FakeInvoker {
- typedef void(*DoInvokeType)(internal::InvokerStorageBase*);
- static void DoInvoke(internal::InvokerStorageBase*) {
+ typedef void(RunType)(internal::BindStateBase*);
+ static void Run(internal::BindStateBase*) {
}
};
// White-box testpoints to inject into a Callback<> object for checking
// comparators and emptiness APIs.
-class FakeInvokerStorage1 : public internal::InvokerStorageBase {
+class FakeBindState1 : public internal::BindStateBase {
public:
- typedef FakeInvoker Invoker;
+ typedef FakeInvoker InvokerType;
};
-class FakeInvokerStorage2 : public internal::InvokerStorageBase {
+class FakeBindState2 : public internal::BindStateBase {
public:
- typedef FakeInvoker Invoker;
+ typedef FakeInvoker InvokerType;
};
TEST(CallbackOld, OneArg) {
@@ -61,8 +61,8 @@ TEST(CallbackOld, ReturnValue) {
class CallbackTest : public ::testing::Test {
public:
CallbackTest()
- : callback_a_(MakeInvokerStorageHolder(new FakeInvokerStorage1())),
- callback_b_(MakeInvokerStorageHolder(new FakeInvokerStorage2())) {
+ : callback_a_(MakeBindStateHolder(new FakeBindState1())),
+ callback_b_(MakeBindStateHolder(new FakeBindState2())) {
}
virtual ~CallbackTest() {
@@ -107,7 +107,7 @@ TEST_F(CallbackTest, Equals) {
// We should compare based on instance, not type.
Callback<void(void)> callback_c(
- MakeInvokerStorageHolder(new FakeInvokerStorage1()));
+ MakeBindStateHolder(new FakeBindState1()));
Callback<void(void)> callback_a2 = callback_a_;
EXPECT_TRUE(callback_a_.Equals(callback_a2));
EXPECT_FALSE(callback_a_.Equals(callback_c));
« no previous file with comments | « base/callback_internal.cc ('k') | base/file_util_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698