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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Created 5 years, 7 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 | « components/tracing/child_trace_message_filter.cc ('k') | content/child/child_histogram_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 18b62cbe49f570f6260859a647c586b0b555b645..5a747aa50e1a6248b9ed1d29eebe75cbfafc7691 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -11,12 +11,14 @@
#include "base/allocator/allocator_extension.h"
#include "base/bind.h"
#include "base/files/file_path.h"
+#include "base/location.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/process/process_metrics.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -424,8 +426,12 @@ static int ToMessageID(WebLocalizedString::Name name) {
return -1;
}
+// TODO(skyostil): Ensure that we always have an active task runner when
+// constructing the platform.
BlinkPlatformImpl::BlinkPlatformImpl()
- : main_thread_task_runner_(base::MessageLoopProxy::current()),
+ : main_thread_task_runner_(base::ThreadTaskRunnerHandle::IsSet()
+ ? base::ThreadTaskRunnerHandle::Get()
+ : nullptr),
shared_timer_func_(NULL),
shared_timer_fire_time_(0.0),
shared_timer_fire_time_was_set_while_suspended_(false),
@@ -1365,7 +1371,7 @@ BlinkPlatformImpl::MainTaskRunnerForCurrentThread() {
main_thread_task_runner_->BelongsToCurrentThread()) {
return main_thread_task_runner_;
} else {
- return base::MessageLoopProxy::current();
+ return base::ThreadTaskRunnerHandle::Get();
}
}
« no previous file with comments | « components/tracing/child_trace_message_filter.cc ('k') | content/child/child_histogram_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698