Migrate MessageLoop::ScopedNestableTaskAllower to RunLoop::Type::kNestableTasksAllowed when used in same scope as a RunLoop variable.

Scripted via https://bugs.chromium.org/p/chromium/issues/detail?id=781352#c1

The script should have replaced a MessageLoop::ScopedNestableTaskAllower
in the same scope as a RunLoop with a RunLoop of
Type::kNestableTasksAllowed. If there was a comment above the
MessageLoop::ScopedNestableTaskAllower, it should have been moved
alongside the augmented RunLoop.

Please CQ if LGTY

This CL was uploaded by git cl split.

[email protected]

Bug: 781352
Change-Id: I1eba95f6d8329b772a81081ad6b9e5a7cd2a6aed
Reviewed-on: https://chromium-review.googlesource.com/757641
Reviewed-by: Tom Sepez <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#514924}
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index dd636b5..eca1d76 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -682,9 +682,7 @@
 }
 
 void SyncChannel::WaitForReplyWithNestedMessageLoop(SyncContext* context) {
-  base::MessageLoop::ScopedNestableTaskAllower allow(
-      base::MessageLoop::current());
-  base::RunLoop nested_loop;
+  base::RunLoop nested_loop(base::RunLoop::Type::kNestableTasksAllowed);
   ReceivedSyncMsgQueue::NestedSendDoneWatcher watcher(context, &nested_loop);
   nested_loop.Run();
 }