Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Unified Diff: tools/gn/loader.cc

Issue 2085023004: Remove calls to deprecated MessageLoop methods in tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/loader_unittest.cc » ('j') | tools/gn/loader_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/loader.cc
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index e3165b9c6f72ae77daea4085531fb1dd7275a23a..69fb7668e17dd200c23ec5b37a7f591c5f774d5a 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "tools/gn/build_settings.h"
#include "tools/gn/err.h"
#include "tools/gn/filesystem_utils.h"
@@ -238,8 +239,8 @@ void LoaderImpl::BackgroundLoadFile(const Settings* settings,
const LocationRange& origin,
const ParseNode* root) {
if (!root) {
- main_loop_->PostTask(FROM_HERE,
- base::Bind(&LoaderImpl::DecrementPendingLoads, this));
+ main_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&LoaderImpl::DecrementPendingLoads, this));
return;
}
@@ -279,7 +280,8 @@ void LoaderImpl::BackgroundLoadFile(const Settings* settings,
trace.Done();
- main_loop_->PostTask(FROM_HERE, base::Bind(&LoaderImpl::DidLoadFile, this));
+ main_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&LoaderImpl::DidLoadFile, this));
}
void LoaderImpl::BackgroundLoadBuildConfig(
@@ -287,8 +289,8 @@ void LoaderImpl::BackgroundLoadBuildConfig(
const Scope::KeyValueMap& toolchain_overrides,
const ParseNode* root) {
if (!root) {
- main_loop_->PostTask(FROM_HERE,
- base::Bind(&LoaderImpl::DecrementPendingLoads, this));
+ main_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&LoaderImpl::DecrementPendingLoads, this));
return;
}
@@ -337,9 +339,9 @@ void LoaderImpl::BackgroundLoadBuildConfig(
}
}
- main_loop_->PostTask(FROM_HERE,
- base::Bind(&LoaderImpl::DidLoadBuildConfig, this,
- settings->toolchain_label()));
+ main_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&LoaderImpl::DidLoadBuildConfig, this,
+ settings->toolchain_label()));
}
void LoaderImpl::DidLoadFile() {
« no previous file with comments | « no previous file | tools/gn/loader_unittest.cc » ('j') | tools/gn/loader_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698