diff options
Diffstat (limited to 'WebCore/loader/cache/CachedResource.h')
-rw-r--r-- | WebCore/loader/cache/CachedResource.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/loader/cache/CachedResource.h b/WebCore/loader/cache/CachedResource.h index ba02459..ed60f84 100644 --- a/WebCore/loader/cache/CachedResource.h +++ b/WebCore/loader/cache/CachedResource.h @@ -70,7 +70,9 @@ public: enum Status { Unknown, // let cache decide what to do with it Pending, // only partially loaded - Cached // regular case + Cached, // regular case + LoadError, + DecodeError }; CachedResource(const String& url, Type); @@ -82,8 +84,8 @@ public: virtual void setEncoding(const String&) { } virtual String encoding() const { return String(); } virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived); - virtual void error() { } - virtual void httpStatusCodeError() { error(); } // Images keep loading in spite of HTTP errors (for legacy compat with <img>, etc.). + virtual void error(CachedResource::Status) { } + virtual void httpStatusCodeError() { error(LoadError); } // Images keep loading in spite of HTTP errors (for legacy compat with <img>, etc.). const String &url() const { return m_url; } Type type() const { return static_cast<Type>(m_type); } @@ -174,8 +176,7 @@ public: String accept() const { return m_accept; } void setAccept(const String& accept) { m_accept = accept; } - bool errorOccurred() const { return m_errorOccurred; } - void setErrorOccurred(bool b) { m_errorOccurred = b; } + bool errorOccurred() const { return (status() == LoadError || status() == DecodeError); } bool sendResourceLoadCallbacks() const { return m_sendResourceLoadCallbacks; } @@ -251,12 +252,11 @@ private: bool m_requestedFromNetworkingLayer : 1; bool m_sendResourceLoadCallbacks : 1; - bool m_errorOccurred : 1; bool m_inCache : 1; bool m_loading : 1; unsigned m_type : 3; // Type - unsigned m_status : 2; // Status + unsigned m_status : 3; // Status #ifndef NDEBUG bool m_deleted; |