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

Unified Diff: net/base/test_completion_callback.h

Issue 699693002: Introducing net::TestCompletionClosure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self reviewed Created 6 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 | « no previous file | net/base/test_completion_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/test_completion_callback.h
diff --git a/net/base/test_completion_callback.h b/net/base/test_completion_callback.h
index f5a9f8da7453d81ddc0cd1f2f31f3bac3b9d86f1..cbbfbe730081c02de3c70e2a14e64caf9e92ba2c 100644
--- a/net/base/test_completion_callback.h
+++ b/net/base/test_completion_callback.h
@@ -5,6 +5,7 @@
#ifndef NET_BASE_TEST_COMPLETION_CALLBACK_H_
#define NET_BASE_TEST_COMPLETION_CALLBACK_H_
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/tuple.h"
#include "net/base/completion_callback.h"
@@ -77,6 +78,22 @@ class TestCompletionCallbackTemplate
} // namespace internal
+class TestClosureCallback
+ : public internal::TestCompletionCallbackBaseInternal {
+ public:
+ TestClosureCallback();
+ ~TestClosureCallback();
jkarlin 2014/11/03 19:17:59 virtual override
gavinp 2014/11/03 22:54:48 Sure. I have to update a bunch of base classes; bu
+
+ using internal::TestCompletionCallbackBaseInternal::WaitForResult;
jkarlin 2014/11/03 19:17:59 Why is this necessary?
gavinp 2014/11/03 22:54:48 Because TestCompletionCallbackBaseInternal::WaitFo
+
+ const base::Closure& callback() const { return callback_; }
+
+ private:
+ const base::Closure callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestClosureCallback);
+};
+
// Base class overridden by custom implementations of TestCompletionCallback.
typedef internal::TestCompletionCallbackTemplate<int>
TestCompletionCallbackBase;
« no previous file with comments | « no previous file | net/base/test_completion_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698