Commit abd5d912 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::ScopedNestableTaskAllower to...

Migrate MessageLoop::ScopedNestableTaskAllower to RunLoop::Type::kNestableTasksAllowed in /ash/drag_drop

This pass focuses on ML::SNTA in same scope as 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.

R=mfomitchev@chromium.org

Bug: 781352
Change-Id: I4b8d600da667c5222b589da0d5881f8c6285200b
Reviewed-on: https://chromium-review.googlesource.com/758574Reviewed-by: default avatarMikhail Fomitchev <mfomitchev@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515278}
parent 1000a49a
......@@ -11,7 +11,6 @@
#include "ash/drag_drop/drag_image_view.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
......@@ -232,10 +231,8 @@ int DragDropController::StartDragAndDrop(
observer.OnDragStarted();
if (should_block_during_drag_drop_) {
base::RunLoop run_loop;
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
quit_closure_ = run_loop.QuitClosure();
base::MessageLoop* loop = base::MessageLoop::current();
base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
run_loop.Run();
}
......
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