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

Unified Diff: net/dns/watching_file_reader_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 | « net/dns/serial_worker_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/watching_file_reader_unittest.cc
diff --git a/net/dns/watching_file_reader_unittest.cc b/net/dns/watching_file_reader_unittest.cc
index 510398c5d97f51a268cbfeabbf66379663a6a22e..6f1dd15226c94739f8b874dfcb1a97994618591e 100644
--- a/net/dns/watching_file_reader_unittest.cc
+++ b/net/dns/watching_file_reader_unittest.cc
@@ -105,23 +105,14 @@ class WatchingFileReaderTest : public testing::Test {
}
protected:
- friend class BreakTask;
- class BreakTask : public Task {
- public:
- BreakTask(WatchingFileReaderTest* test, std::string breakpoint)
- : test_(test), breakpoint_(breakpoint) {}
- virtual ~BreakTask() {}
- virtual void Run() OVERRIDE {
- test_->breakpoint_ = breakpoint_;
- MessageLoop::current()->QuitNow();
- }
- private:
- WatchingFileReaderTest* 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,
+ new base::Bind(&WatchingFileReaderTest::BreakCallback, this, b));
mmenke 2011/11/30 02:29:05 I'm no expert on the new callback system, but it d
groby-ooo-7-16 2011/11/30 03:03:42 You are absolutely correct, thank you for catching
}
void RunUntilBreak(std::string b) {
« no previous file with comments | « net/dns/serial_worker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698