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

Remove MessageLoop::current() usage in /content/browser/devtools

Replacing it with modern RunLoop+QuitClosure usage.

R=caseq@chromium.org

Bug: 825327
Change-Id: I43e021d3a3c5e76923e77c8d28560931dc3ee866
Reviewed-on: https://chromium-review.googlesource.com/1024445Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553699}
parent 583b5b5c
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/json/json_reader.h" #include "base/json/json_reader.h"
#include "base/json/json_writer.h" #include "base/json/json_writer.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -2442,11 +2441,12 @@ class CountingDownloadFile : public download::DownloadFileImpl { ...@@ -2442,11 +2441,12 @@ class CountingDownloadFile : public download::DownloadFileImpl {
// until data is returned. // until data is returned.
static int GetNumberActiveFilesFromFileThread() { static int GetNumberActiveFilesFromFileThread() {
int result = -1; int result = -1;
base::RunLoop run_loop;
download::GetDownloadTaskRunner()->PostTaskAndReply( download::GetDownloadTaskRunner()->PostTaskAndReply(
FROM_HERE, FROM_HERE,
base::BindOnce(&CountingDownloadFile::GetNumberActiveFiles, &result), base::BindOnce(&CountingDownloadFile::GetNumberActiveFiles, &result),
base::MessageLoop::current()->QuitWhenIdleClosure()); run_loop.QuitWhenIdleClosure());
base::RunLoop().Run(); run_loop.Run();
DCHECK_NE(-1, result); DCHECK_NE(-1, result);
return result; return result;
} }
......
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