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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp

Issue 2657793002: Make WebURLLoaderMockFactoryImpl::createURLLoader accept nullptr (Closed)
Patch Set: base change Created 3 years, 11 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: third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
index b8cb18f579c15bdaf0ba57390225e42663f57297..70467d9a4d102edfc7dec20f6448a9beebc1a0c6 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
@@ -15,35 +15,6 @@
namespace blink {
-namespace {
-
-// WebURLLoader that does nothing. This instance should be passed as a default
-// WebURLLoader to create a WebURLLoader through WebURLLoaderMockFactory.
-class AssertWebURLLoader : public WebURLLoader {
- public:
- ~AssertWebURLLoader() override {}
-
- // WebURLLoader:
- void loadSynchronously(const WebURLRequest&,
- WebURLResponse&,
- WebURLError&,
- WebData&,
- int64_t& encodedDataLength,
- int64_t& encodedBodyLength) override {
- NOTREACHED();
- }
- void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*) override {
- NOTREACHED();
- }
- void cancel() override { NOTREACHED(); }
- void setDefersLoading(bool defer) override { NOTREACHED(); }
- void setLoadingTaskRunner(base::SingleThreadTaskRunner*) override {
- NOTREACHED();
- }
-};
-
-} // namespace
-
FetchTestingPlatformSupport::FetchTestingPlatformSupport()
: m_urlLoaderMockFactory(new WebURLLoaderMockFactoryImpl(this)) {}
@@ -70,7 +41,7 @@ FetchTestingPlatformSupport::getURLLoaderMockFactory() {
}
WebURLLoader* FetchTestingPlatformSupport::createURLLoader() {
- return m_urlLoaderMockFactory->createURLLoader(new AssertWebURLLoader);
+ return m_urlLoaderMockFactory->createURLLoader(nullptr);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698