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

Unified Diff: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h

Issue 1615703002: Removal of rel=preload link elements should stop the download. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back clear() Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/LinkLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
diff --git a/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h b/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
index f73ac7237fca3469226138fef928e319666ed089..519b38b257e97cfdf8d422383b25b0bfc435ed97 100644
--- a/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
+++ b/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
@@ -8,6 +8,7 @@
#include "core/fetch/CSSStyleSheetResource.h"
#include "core/fetch/FontResource.h"
#include "core/fetch/ImageResourceClient.h"
+#include "core/fetch/ResourceLoader.h"
#include "core/fetch/ResourceOwner.h"
#include "core/fetch/ScriptResource.h"
#include "core/fetch/StyleSheetResourceClient.h"
@@ -21,6 +22,7 @@ public:
virtual ~LinkPreloadResourceClient() { }
void triggerEvents(const Resource*);
+ virtual void clear() = 0;
DEFINE_INLINE_VIRTUAL_TRACE()
{
@@ -48,6 +50,9 @@ public:
}
virtual String debugName() const { return "LinkPreloadScript"; }
+ virtual ~LinkPreloadScriptResourceClient() { }
+
+ void clear() override { clearResource(); }
void notifyFinished(Resource* resource) override
{
@@ -79,6 +84,9 @@ public:
}
virtual String debugName() const { return "LinkPreloadStyle"; }
+ virtual ~LinkPreloadStyleResourceClient() { }
+
+ void clear() override { clearResource(); }
void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSStyleSheetResource* resource) override
{
« no previous file with comments | « third_party/WebKit/Source/core/loader/LinkLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698