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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 2051243002: Drop ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startLoad
Patch Set: Rebase Created 4 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: third_party/WebKit/Source/core/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index 9a98251a0e375223dae14098aef57c85805722a0..d9d8e9622c71088463ea3fb14c79d37ffa4a901e 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -27,7 +27,6 @@
#include "core/fetch/MemoryCache.h"
#include "core/fetch/ResourceClient.h"
#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoader.h"
#include "core/fetch/ResourceLoadingLog.h"
#include "core/svg/graphics/SVGImage.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -397,8 +396,8 @@ void ImageResource::updateImage(bool allDataReceived)
clear();
if (!errorOccurred())
setStatus(DecodeError);
- if (!allDataReceived && loader())
- loader()->didFinishLoading(nullptr, monotonicallyIncreasingTime(), size);
+ if (!allDataReceived && fetcher())
+ fetcher()->didFinishLoading(fetcher()->loaderForResource(this), monotonicallyIncreasingTime(), size);
memoryCache()->remove(this);
}
@@ -533,7 +532,7 @@ void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher)
setCachePolicyBypassingCache();
setLoFiStateOff();
if (isLoading())
- loader()->cancel();
+ fetcher->cancelResourceLoad(this);
clear();
notifyObservers();
@@ -569,8 +568,8 @@ void ImageResource::onePartInMultipartReceived(const ResourceResponse& response)
// Resource::finish()/error() so we don't mark them finished here.
notifyObserversInternal(MarkFinishedOption::DoNotMarkFinished);
notifyClientsInternal(MarkFinishedOption::DoNotMarkFinished);
- if (loader())
- loader()->didFinishLoadingFirstPartInMultipart();
+ if (fetcher())
+ fetcher()->didFinishLoadingFirstPartInMultipart(this);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/BUILD.gn ('k') | third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698