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

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: 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 aa92d4971d607147a487ba97a7f4ab91edff19e4..c55449b8e1f7e9a4170eca96b54986933f4ad959 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