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

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

Issue 1976463003: Preload scan external CSS for @import (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + minor style tweaks Created 4 years, 4 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/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index 31065b424de1b0d4ae6081c43870045d0a58e1d1..a88e43c79f3cd47a0321c0f9c034fee86bcf72e2 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -661,9 +661,9 @@ static bool shouldSendCachedDataSynchronouslyForType(Resource::Type type)
return false;
}
-void Resource::willAddClientOrObserver()
+void Resource::willAddClientOrObserver(PreloadReferencePolicy policy)
{
- if (m_preloadResult == PreloadNotReferenced) {
+ if (policy == MarkAsReferenced && m_preloadResult == PreloadNotReferenced) {
if (isLoaded())
m_preloadResult = PreloadReferencedWhileComplete;
else if (isLoading())
@@ -681,9 +681,9 @@ void Resource::willAddClientOrObserver()
memoryCache()->makeLive(this);
}
-void Resource::addClient(ResourceClient* client)
+void Resource::addClient(ResourceClient* client, PreloadReferencePolicy policy)
{
- willAddClientOrObserver();
+ willAddClientOrObserver(policy);
if (m_isRevalidating) {
m_clients.add(client);
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ResourceOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698