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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1366883002: [Reland] Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a clone method to WebTaskRunner which lets us solve the lifetime issue. Created 5 years, 3 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
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index c8f41688a6fb8017f9075e160af300c0d5673640..db4f2fc45e5d92702df0ad9fad886303ae057d59 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -34,6 +34,7 @@
#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"
@@ -478,7 +479,7 @@ WebURLLoader* BlinkPlatformImpl::createURLLoader() {
// data URLs to bypass the ResourceDispatcher.
return new WebURLLoaderImpl(
child_thread ? child_thread->resource_dispatcher() : NULL,
- MainTaskRunnerForCurrentThread());
+ new scheduler::WebTaskRunnerImpl(LoadingTaskRunnerForCurrentThread()));
Sami 2015/09/29 11:22:46 Since LoadingTaskRunnerForCurrentThread is only us
alex clarke (OOO till 29th) 2015/09/29 16:37:38 Done.
}
blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
@@ -1364,7 +1365,7 @@ uint32_t BlinkPlatformImpl::getUniqueIdForProcess() {
}
scoped_refptr<base::SingleThreadTaskRunner>
-BlinkPlatformImpl::MainTaskRunnerForCurrentThread() {
+BlinkPlatformImpl::LoadingTaskRunnerForCurrentThread() {
Sami 2015/09/29 11:22:46 I think you could replace all of this with base::T
alex clarke (OOO till 29th) 2015/09/29 16:37:38 Done.
if (main_thread_task_runner_.get() &&
main_thread_task_runner_->BelongsToCurrentThread()) {
return main_thread_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698