Chromium Code Reviews| Index: storage/common/blob_storage/blob_storage_constants.cc |
| diff --git a/storage/common/blob_storage/blob_storage_constants.cc b/storage/common/blob_storage/blob_storage_constants.cc |
| index 0257117e3233ada5d027dbf3b808564e1c7b3294..2d825f4534b291080770be9ef75e3a864dcb9ced 100644 |
| --- a/storage/common/blob_storage/blob_storage_constants.cc |
| +++ b/storage/common/blob_storage/blob_storage_constants.cc |
| @@ -12,6 +12,12 @@ bool BlobStatusIsError(BlobStatus status) { |
| return static_cast<int>(status) <= static_cast<int>(BlobStatus::LAST_ERROR); |
| } |
| +bool BlobStatusIsPending(BlobStatus status) { |
| + int status_int = static_cast<int>(status); |
| + return status_int >= static_cast<int>(BlobStatus::PENDING_QUOTA) && |
| + status_int <= static_cast<int>(BlobStatus::PENDING_INTERNALS); |
| +} |
| + |
| bool BlobStatusIsBadIPC(BlobStatus status) { |
| return status == BlobStatus::ERR_INVALID_CONSTRUCTION_ARGUMENTS; |
|
michaeln
2016/11/07 21:47:05
if this is the only error that's considered a bad
dmurph
2016/11/08 21:19:59
I think it helps clarify the special case, and doc
|
| } |