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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 1904403004: Remove PlatformImpl::createURLLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_blink_web_unit_test_support.cc
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index b9b1532a28ac81c33e98a5dcc105b58750720bc5..f3f9fc48db6ad13a6be90dd1388dad4d72777a85 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -21,6 +21,7 @@
#include "components/scheduler/renderer/renderer_scheduler_impl.h"
#include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
#include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h"
+#include "content/child/web_url_loader_impl.h"
#include "content/test/mock_webclipboard_impl.h"
#include "content/test/web_gesture_curve_mock.h"
#include "media/base/media.h"
@@ -30,6 +31,8 @@
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/WebKit/public/platform/WebTaskRunner.h"
+#include "third_party/WebKit/public/platform/WebThread.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebNetworkStateNotifier.h"
@@ -185,8 +188,12 @@ blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() {
}
blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() {
- return url_loader_factory_->createURLLoader(
- BlinkPlatformImpl::createURLLoader());
+ blink::WebThread* currentThread = Platform::current()->currentThread();
+ // This loader should be used only for process-local resources such as
+ // data URLs.
+ blink::WebURLLoader* default_loader = new WebURLLoaderImpl(
+ nullptr, base::WrapUnique(currentThread->getWebTaskRunner()->clone()));
+ return url_loader_factory_->createURLLoader(default_loader);
}
blink::WebString TestBlinkWebUnitTestSupport::userAgent() {
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698