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

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

Issue 2494243003: Set WebFont priority to very low if the network is detected to be slow (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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/fetch/FontResource.h ('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/fetch/FontResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FontResource.cpp b/third_party/WebKit/Source/core/fetch/FontResource.cpp
index 2de0a247cda364998c55aca696d0456f8f37c313..fd9bf9e757ba7a0cd2e0e7e211a000a6f26a5b9d 100644
--- a/third_party/WebKit/Source/core/fetch/FontResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/FontResource.cpp
@@ -175,4 +175,16 @@ void FontResource::checkNotify() {
Resource::checkNotify();
}
+bool FontResource::isLowPriorityLoadingAllowedForRemoteFont() const {
+ DCHECK(!url().protocolIsData());
+ DCHECK(!isLoaded());
+ ResourceClientWalker<FontResourceClient> walker(clients());
+ while (FontResourceClient* client = walker.next()) {
+ if (!client->isLowPriorityLoadingAllowedForRemoteFont()) {
+ return false;
+ }
+ }
+ return true;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698