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

Unified Diff: net/dns/serial_worker_unittest.cc

Issue 8735014: base::Bind fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | net/dns/watching_file_reader_unittest.cc » ('j') | net/dns/watching_file_reader_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/serial_worker_unittest.cc
diff --git a/net/dns/serial_worker_unittest.cc b/net/dns/serial_worker_unittest.cc
index 4062c2a2823a4d8949b0a151e2f1083a558593b5..53b53a5e814a6fbbffe050b6766efbfd2a4f1b03 100644
--- a/net/dns/serial_worker_unittest.cc
+++ b/net/dns/serial_worker_unittest.cc
@@ -60,23 +60,14 @@ class SerialWorkerTest : public testing::Test {
}
protected:
- friend class BreakTask;
- class BreakTask : public Task {
- public:
- BreakTask(SerialWorkerTest* test, std::string breakpoint)
- : test_(test), breakpoint_(breakpoint) {}
- virtual ~BreakTask() {}
- virtual void Run() OVERRIDE {
- test_->breakpoint_ = breakpoint_;
- MessageLoop::current()->QuitNow();
- }
- private:
- SerialWorkerTest* test_;
- std::string breakpoint_;
- };
+ void BreakCallback(std::string breakpoint) {
+ breakpoint_ = breakpoint;
+ MessageLoop::current()->QuitNow();
+ }
void BreakNow(std::string b) {
- message_loop_->PostTask(FROM_HERE, new BreakTask(this, b));
+ message_loop_->PostTask(FROM_HERE,
+ base::Bind(&SerialWorkerTest::BreakCallback, this, b));
}
void RunUntilBreak(std::string b) {
« no previous file with comments | « no previous file | net/dns/watching_file_reader_unittest.cc » ('j') | net/dns/watching_file_reader_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698