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

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

Issue 2537063002: Split Resource::Status into a separate file (Closed)
Patch Set: Rebase Created 4 years 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/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index f7617f1d8b387bdd90c20efef3ee6a7bf0835ccb..0f719870af7a6bc608662824d6fbdaba12abfe69 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -28,6 +28,7 @@
#include "core/fetch/CachedMetadataHandler.h"
#include "core/fetch/IntegrityMetadata.h"
#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/fetch/ResourceStatus.h"
#include "platform/MemoryCoordinator.h"
#include "platform/SharedBuffer.h"
#include "platform/Timer.h"
@@ -83,13 +84,14 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
};
static const int kLastResourceType = Manifest + 1;
- enum Status {
- NotStarted,
- Pending, // load in progress
- Cached, // load completed successfully
- LoadError,
- DecodeError
- };
+ using Status = ResourceStatus;
+
+ // TODO(hiroshige): Remove the following declarations.
+ static constexpr Status NotStarted = ResourceStatus::NotStarted;
+ static constexpr Status Pending = ResourceStatus::Pending;
+ static constexpr Status Cached = ResourceStatus::Cached;
+ static constexpr Status LoadError = ResourceStatus::LoadError;
+ static constexpr Status DecodeError = ResourceStatus::DecodeError;
// Whether a resource client for a preload should mark the preload as
// referenced.

Powered by Google App Engine
This is Rietveld 408576698