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

Unified Diff: storage/common/blob_storage/blob_storage_constants.h

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: Fixed unused function Created 4 years, 1 month 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: storage/common/blob_storage/blob_storage_constants.h
diff --git a/storage/common/blob_storage/blob_storage_constants.h b/storage/common/blob_storage/blob_storage_constants.h
index 8052a21b6f8ee7886a01d399eadeabef0a1ecd17..c48f44c3d3923327a615f66a08d781ec47adb6f9 100644
--- a/storage/common/blob_storage/blob_storage_constants.h
+++ b/storage/common/blob_storage/blob_storage_constants.h
@@ -13,15 +13,6 @@
namespace storage {
-// All sizes are in bytes. Deprecated, please use BlobStorageLimits.
-const int64_t kBlobStorageMaxMemoryUsage = 500 * 1024 * 1024; // Half a gig.
-const size_t kBlobStorageIPCThresholdBytes = 250 * 1024;
-const size_t kBlobStorageMaxSharedMemoryBytes = 10 * 1024 * 1024;
-const uint64_t kBlobStorageMaxFileSizeBytes = 100 * 1024 * 1024;
-const uint64_t kBlobStorageMinFileSizeBytes = 1 * 1024 * 1024;
-const size_t kBlobStorageMaxBlobMemorySize =
- kBlobStorageMaxMemoryUsage - kBlobStorageMinFileSizeBytes;
-
// All sizes are in bytes.
struct BlobStorageLimits {
size_t memory_limit_before_paging() const {
@@ -55,28 +46,6 @@ enum class IPCBlobItemRequestStrategy {
LAST = FILE
};
-// These items cannot be reordered or renumbered because they're recorded to
-// UMA. New items must be added immediately before LAST, and LAST must be set to
-// the the last item.
-// DEPRECATED, please use BlobStatus instead.
-enum class IPCBlobCreationCancelCode {
- UNKNOWN = 0,
- OUT_OF_MEMORY = 1,
- // We couldn't create or write to a file. File system error, like a full disk.
- FILE_WRITE_FAILED = 2,
- // The renderer was destroyed while data was in transit.
- SOURCE_DIED_IN_TRANSIT = 3,
- // The renderer destructed the blob before it was done transferring, and there
- // were no outstanding references (no one is waiting to read) to keep the
- // blob alive.
- BLOB_DEREFERENCED_WHILE_BUILDING = 4,
- // A blob that we referenced during construction is broken, or a browser-side
- // builder tries to build a blob with a blob reference that isn't finished
- // constructing.
- REFERENCED_BLOB_BROKEN = 5,
- LAST = REFERENCED_BLOB_BROKEN
-};
-
// This is the enum to rule them all in the blob system.
// These values are used in UMA metrics, so they should not be changed. Please
// update LAST_ERROR if you add an error condition and LAST if you add new
@@ -108,8 +77,10 @@ enum class BlobStatus {
// populating pending data, and/or copying data from dependent blobs. See
// InternalBlobData::BuildingState determine which of these are happening, as
michaeln 2016/11/07 21:47:05 InternalBlobData is stale
dmurph 2016/11/08 21:19:59 Done.
// they all can happen concurrently.
- PENDING = 201,
- LAST = PENDING
+ PENDING_QUOTA = 201,
+ PENDING_TRANSPORT = 202,
+ PENDING_INTERNALS = 203,
+ LAST = PENDING_INTERNALS
};
using BlobStatusCallback = base::Callback<void(BlobStatus)>;
@@ -117,8 +88,12 @@ using BlobStatusCallback = base::Callback<void(BlobStatus)>;
// Returns if the status is an error code.
STORAGE_COMMON_EXPORT bool BlobStatusIsError(BlobStatus status);
+STORAGE_COMMON_EXPORT bool BlobStatusIsPending(BlobStatus status);
+
// Returns if the status is a bad enough error to flag the IPC as bad. This is
// only INVALID_CONSTRUCTION_ARGUMENTS.
+// When a system gives a BadIPC status, it has already cleaned up & removed the
michaeln 2016/11/07 21:47:05 the comment about "already cleaned up" seems out o
dmurph 2016/11/08 21:19:59 Can't inline, it breaks builds.
+// blob internally.
STORAGE_COMMON_EXPORT bool BlobStatusIsBadIPC(BlobStatus status);
} // namespace storage

Powered by Google App Engine
This is Rietveld 408576698