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

Unified Diff: net/base/file_stream_unittest.cc

Issue 9384024: Prefer ScopedNestableTaskAllower over manual save/restore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename back to "allow". Created 8 years, 10 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
« no previous file with comments | « ipc/ipc_sync_channel.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_unittest.cc
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index a0500c1f999a8d89a46f9fad1164944507c13c6b..712904e06625df0f43f728124bf548e8dc9bde3f 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -749,10 +749,8 @@ class TestWriteReadCompletionCallback {
char buf[4];
rv = stream_->Read(buf, arraysize(buf), callback.callback());
if (rv == ERR_IO_PENDING) {
- bool old_state = MessageLoop::current()->NestableTasksAllowed();
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
rv = callback.WaitForResult();
- MessageLoop::current()->SetNestableTasksAllowed(old_state);
}
EXPECT_LE(0, rv);
if (rv <= 0)
« no previous file with comments | « ipc/ipc_sync_channel.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698