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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1379543003: Revert of Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « content/child/blink_platform_impl.h ('k') | content/child/request_info.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 3b26b612632bf59a2e29c8cd9799d80724343e73..c8f41688a6fb8017f9075e160af300c0d5673640 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -34,7 +34,6 @@
#include "blink/public/resources/grit/blink_image_resources.h"
#include "blink/public/resources/grit/blink_resources.h"
#include "components/mime_util/mime_util.h"
-#include "components/scheduler/child/web_task_runner_impl.h"
#include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
#include "content/app/resources/grit/content_resources.h"
#include "content/app/strings/grit/content_strings.h"
@@ -479,8 +478,7 @@
// data URLs to bypass the ResourceDispatcher.
return new WebURLLoaderImpl(
child_thread ? child_thread->resource_dispatcher() : NULL,
- make_scoped_ptr(new scheduler::WebTaskRunnerImpl(
- base::ThreadTaskRunnerHandle::Get())));
+ MainTaskRunnerForCurrentThread());
}
blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
@@ -1365,6 +1363,16 @@
return base::trace_event::TraceLog::GetInstance()->process_id();
}
+scoped_refptr<base::SingleThreadTaskRunner>
+BlinkPlatformImpl::MainTaskRunnerForCurrentThread() {
+ if (main_thread_task_runner_.get() &&
+ main_thread_task_runner_->BelongsToCurrentThread()) {
+ return main_thread_task_runner_;
+ } else {
+ return base::ThreadTaskRunnerHandle::Get();
+ }
+}
+
bool BlinkPlatformImpl::IsMainThread() const {
return main_thread_task_runner_.get() &&
main_thread_task_runner_->BelongsToCurrentThread();
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698