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

Use modern base APIs to avoid base::MessageLoop::current() calls in first_run_dialog.cc

This is one more identical change as https://chromium-review.googlesource.com/c/chromium/src/+/986535
in chrome/browser/ui/views which I'd missed in that CL.

TBR=sky@chromium.org

Bug: 825327
Change-Id: I6e3c8a1dbf0028c842fce9db1e4e1d4e648974f2
Reviewed-on: https://chromium-review.googlesource.com/996152Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548123}
parent 4d7c6043
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <string> #include <string>
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "chrome/browser/first_run/first_run.h" #include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/metrics/metrics_reporting_state.h" #include "chrome/browser/metrics/metrics_reporting_state.h"
...@@ -59,9 +58,7 @@ void FirstRunDialog::Show(Profile* profile) { ...@@ -59,9 +58,7 @@ void FirstRunDialog::Show(Profile* profile) {
FirstRunDialog* dialog = new FirstRunDialog(profile); FirstRunDialog* dialog = new FirstRunDialog(profile);
views::DialogDelegate::CreateDialogWidget(dialog, NULL, NULL)->Show(); views::DialogDelegate::CreateDialogWidget(dialog, NULL, NULL)->Show();
base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
base::MessageLoopForUI::ScopedNestableTaskAllower allow_nested(loop);
base::RunLoop run_loop;
dialog->quit_runloop_ = run_loop.QuitClosure(); dialog->quit_runloop_ = run_loop.QuitClosure();
run_loop.Run(); 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