Commit 7c7b1aeb authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::ScopedNestableTaskAllower to...

Migrate MessageLoop::ScopedNestableTaskAllower to RunLoop::Type::kNestableTasksAllowed in /content/browser/renderer_host/media

This pass focuses on ML::SNTA in same scope as an anonymous RunLoop().RunUntilIdle()
Scripted via a small tweak of https://bugs.chromium.org/p/chromium/issues/detail?id=781352#c1
which focused on RunLoops with a variable name.

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.

Includes should have been stripped if the was the last usage of message_loop.h
in that file.

Please CQ if LGTY

This CL was uploaded by git cl split.

R=xhwang@chromium.org

Bug: 781352
Change-Id: Iae32d4a5cbb177de34391d8cf99e423e4d465cdb
Reviewed-on: https://chromium-review.googlesource.com/995921Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548161}
parent 49398e33
......@@ -12,7 +12,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/sync_socket.h"
#include "content/browser/media/capture/audio_mirroring_manager.h"
......@@ -593,11 +592,7 @@ class AudioOutputDelegateTest : public testing::Test {
// New tasks might be posted while we are syncing, but in every iteration at
// least one task will be run. 20 iterations should be enough for our code.
for (int i = 0; i < 20; ++i) {
{
base::MessageLoop::ScopedNestableTaskAllower allower(
base::MessageLoop::current());
base::RunLoop().RunUntilIdle();
}
base::RunLoop(base::RunLoop::Type::kNestableTasksAllowed).RunUntilIdle();
SyncWith(BrowserThread::GetTaskRunnerForThread(BrowserThread::UI));
SyncWith(audio_manager_->GetWorkerTaskRunner());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment