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

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

Issue 2453813004: WebFonts cache-aware timeout adaptation (Closed)
Patch Set: simplify by not calling cache miss callback in didAddClient() Created 4 years, 2 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/FontResource.h
diff --git a/third_party/WebKit/Source/core/fetch/FontResource.h b/third_party/WebKit/Source/core/fetch/FontResource.h
index e83ab315a525782642b34205c432c2d1cc84114f..463c6fa670d3ebe2e7a29882e6101c5b652d1ee5 100644
--- a/third_party/WebKit/Source/core/fetch/FontResource.h
+++ b/third_party/WebKit/Source/core/fetch/FontResource.h
@@ -67,6 +67,10 @@ class CORE_EXPORT FontResource final : public Resource {
bool italic,
FontOrientation = FontOrientation::Horizontal);
+ // Calls to addClient() and removeClient() is forbidden in this callback to
Kunihiko Sakamoto 2016/10/31 08:22:46 Is this restriction specific to FontResource? If n
yhirano 2016/10/31 12:44:32 The comment is for FontResourceClient implementers
Shao-Chuan Lee 2016/11/01 08:57:07 Moved comment to FontResourceClient.
+ // prevent potential race issues.
+ void willReloadAfterDiskCacheMiss() override;
+
private:
class FontResourceFactory : public ResourceFactory {
public:
@@ -83,6 +87,8 @@ class CORE_EXPORT FontResource final : public Resource {
void checkNotify() override;
void fontLoadShortLimitCallback(TimerBase*);
void fontLoadLongLimitCallback(TimerBase*);
+ void notifyClientsShortLimitExceeded();
+ void notifyClientsLongLimitExceeded();
enum LoadLimitState {
LoadNotStarted,
@@ -112,6 +118,7 @@ class FontResourceClient : public ResourceClient {
ResourceClientType getResourceClientType() const final { return FontType; }
virtual void fontLoadShortLimitExceeded(FontResource*) {}
Kunihiko Sakamoto 2016/10/31 08:22:46 Can you add a comment noting that these callbacks
Kunihiko Sakamoto 2016/11/02 03:46:36 Ping, in case you have missed this comment.
Shao-Chuan Lee 2016/11/07 06:52:47 Done.
virtual void fontLoadLongLimitExceeded(FontResource*) {}
+ virtual void willReloadAfterDiskCacheMiss(const FontResource*) {}
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp ('k') | third_party/WebKit/Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698