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

Unified Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 9384024: Prefer ScopedNestableTaskAllower over manual save/restore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: net/socket/client_socket_pool_base_unittest.cc
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 3ef34c48249d7e6079e641c98b0089929413f6e9..c80b4d327d57137ac4c093f613c046ad06ad05bd 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -1410,8 +1410,7 @@ class RequestSocketCallback : public TestCompletionCallbackBase {
handle_->socket()->Disconnect();
handle_->Reset();
{
- MessageLoop::ScopedNestableTaskAllower nestable(
- MessageLoop::current());
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
MessageLoop::current()->RunAllPending();
}
within_callback_ = true;
jar (doing other things) 2012/02/11 03:24:38 This is a *little* scary. The names (and pattern
dhollowa 2012/02/13 17:44:26 I've added willchan@ to the CC list.
willchan no longer on Chromium 2012/02/14 01:43:42 I've looked at it and it's minorly scary as jar@ s
dhollowa 2012/02/14 03:19:49 Done.
@@ -1437,7 +1436,7 @@ class RequestSocketCallback : public TestCompletionCallbackBase {
// operations that happen on timers (e.g. cleanup of idle
// connections) can execute.
{
- MessageLoop::ScopedNestableTaskAllower nestable(
+ MessageLoop::ScopedNestableTaskAllower allow(
MessageLoop::current());
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10));
jar (doing other things) 2012/02/11 03:24:38 This doesn't make sense to me. All we're doing is
jar (doing other things) 2012/02/14 01:51:43 What about removing this allow call?? On 2012/02/
willchan no longer on Chromium 2012/02/14 01:54:10 Jim's suggestion sounds correct to me here, we can
dhollowa 2012/02/14 03:19:49 Done.
dhollowa 2012/02/14 16:35:50 I had to restore the ScopedNestableTaskAllower bec
EXPECT_EQ(OK, next_job_callback.WaitForResult());

Powered by Google App Engine
This is Rietveld 408576698