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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/Resource.h

Issue 2527353002: Phase II Step 3: Reload LoFi/placeholder images via new ImageResource
Patch Set: Use startLoad() again to avoid re-applying modifications to ResourceRequest on reload Created 3 years, 9 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/Resource.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
index 8c0645ff0b8805ef3d0671d71cf52ecc5be66619..d4f70a8ed8fef985aad15988871081d14558e41a 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
@@ -331,8 +331,14 @@ class PLATFORM_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
// If this Resource is ImageResource and has the Lo-Fi response headers or is
// a placeholder, reload the full original image with the Lo-Fi state set to
// off and optionally bypassing the cache.
- virtual void reloadIfLoFiOrPlaceholderImage(ResourceFetcher*,
- ReloadLoFiOrPlaceholderPolicy) {}
+ // If reloading is started, this method returns a new Resource that is used
+ // for reloading, and |this| should be no longer used.
+ // Otherwise, this method returns nullptr.
+ virtual Resource* reloadIfLoFiOrPlaceholderImage(
+ ResourceFetcher*,
+ ReloadLoFiOrPlaceholderPolicy) {
+ return nullptr;
+ }
static const char* resourceTypeToString(
Type,
@@ -390,10 +396,6 @@ class PLATFORM_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
return m_clients;
}
- void setCachePolicyBypassingCache();
- void setPreviewsStateNoTransform();
- void clearRangeRequestHeader();
-
SharedBuffer* data() const { return m_data.get(); }
void clearData();

Powered by Google App Engine
This is Rietveld 408576698