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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 2319483002: Turn off isLinkPreload() when used (Closed)
Patch Set: Using a mock resource client 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index c36c8c6f00416a20028f998483bd92bc2334475a..b78732f2bf16f8f4255deece59644e293c6a9728 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -214,6 +214,9 @@ public:
DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBufferingPolicy; }
void setDataBufferingPolicy(DataBufferingPolicy);
+ // The isPreloaded() flag is using a counter in order to make sure that even when
+ // multiple ResourceFetchers are preloading the resource, it will remain marked as
+ // preloaded until *all* of them have used it.
bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() == PreloadNotReferenced; }
bool isPreloaded() const { return m_preloadCount; }
void increasePreloadCount() { ++m_preloadCount; }
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698