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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResource.cpp

Issue 2642383003: Replace Resource::Status with ResourceStatus (Closed)
Patch Set: Rebase. Created 3 years, 11 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/loader/resource/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
index dda3a38ec51e6d9dcc93453f87df3340e2c6ea74..f3c3221bbc7ea871a40579cbb28be63ab2f888d6 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
@@ -76,9 +76,7 @@ class ImageResource::ImageResourceInfoImpl final
const ResourceResponse& response() const override {
return m_resource->response();
}
- Resource::Status getStatus() const override {
- return m_resource->getStatus();
- }
+ ResourceStatus getStatus() const override { return m_resource->getStatus(); }
bool isPlaceholder() const override { return m_resource->isPlaceholder(); }
bool isCacheValidator() const override {
return m_resource->isCacheValidator();
@@ -326,7 +324,7 @@ void ImageResource::decodeError(bool allDataReceived) {
clearData();
setEncodedSize(0);
if (!errorOccurred())
- setStatus(DecodeError);
+ setStatus(ResourceStatus::DecodeError);
if (!allDataReceived && loader()) {
// TODO(hiroshige): Do not call didFinishLoading() directly.
@@ -442,7 +440,7 @@ void ImageResource::reloadIfLoFiOrPlaceholderImage(
false);
}
- setStatus(NotStarted);
+ setStatus(ResourceStatus::NotStarted);
DCHECK(m_isSchedulingReload);
m_isSchedulingReload = false;
@@ -466,7 +464,7 @@ void ImageResource::onePartInMultipartReceived(
m_multipartParsingState = MultipartParsingState::FinishedParsingFirstPart;
// Notify finished when the first part ends.
if (!errorOccurred())
- setStatus(Cached);
+ setStatus(ResourceStatus::Cached);
// We notify clients and observers of finish in checkNotify() and
// updateImageAndClearBuffer(), respectively, and they will not be
// notified again in Resource::finish()/error().

Powered by Google App Engine
This is Rietveld 408576698