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

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

Issue 1802123002: Unify Resource loading status tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 9fa27cb7e0d6e3f32573080d2a7e662abc6a7a6a..9702c5ebe6107759bd54f64b64c6d73ca1bfce50 100644
--- a/third_party/WebKit/Source/core/fetch/FontResource.h
+++ b/third_party/WebKit/Source/core/fetch/FontResource.h
@@ -53,9 +53,8 @@ public:
void allClientsRemoved() override;
void beginLoadIfNeeded(ResourceFetcher* dl);
- bool stillNeedsLoad() const override { return m_state < LoadInitiated; }
- bool loadScheduled() const { return m_state != Unloaded; }
+ bool loadScheduled() const { return getStatus() == LoadStartScheduled; }
void didScheduleLoad();
void didUnscheduleLoad();
@@ -86,11 +85,11 @@ private:
void fontLoadShortLimitCallback(Timer<FontResource>*);
void fontLoadLongLimitCallback(Timer<FontResource>*);
- enum State { Unloaded, LoadScheduled, LoadInitiated, ShortLimitExceeded, LongLimitExceeded };
+ enum LoadLimitState { UnderLimit, ShortLimitExceeded, LongLimitExceeded };
OwnPtr<FontCustomPlatformData> m_fontData;
String m_otsParsingMessage;
- State m_state;
+ LoadLimitState m_loadLimitState;
bool m_corsFailed;
Timer<FontResource> m_fontLoadShortLimitTimer;
Timer<FontResource> m_fontLoadLongLimitTimer;

Powered by Google App Engine
This is Rietveld 408576698