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 70428fc06439fa2947416d13f9a3cb08b2b4ef80..903d178c6c628478dcb57b9c6ab9576dbc8d5fe8 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; } |
@@ -253,6 +256,8 @@ public: |
static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
+ void testOnlyWillAddClientOrObserver(PreloadReferencePolicy policy) { willAddClientOrObserver(policy); } |
Yoav Weiss
2016/09/13 09:33:18
Adding this test only method, since adding an actu
Nate Chapin
2016/09/13 22:34:17
...this is all single threaded, isn't it? This exp
Charlie Harrison
2016/09/16 12:18:47
I think a "ForTesting" suffix is more common and I
Charlie Harrison
2016/09/16 12:31:38
Apologies this was a very out of date draft commen
|
+ |
protected: |
Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); |