| 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 2d825f4534b291080770be9ef75e3a864dcb9ced..72411a7f847f1416f772eeacb7ab6b2a413e6e11 100644
|
| --- a/storage/common/blob_storage/blob_storage_constants.cc
|
| +++ b/storage/common/blob_storage/blob_storage_constants.cc
|
| @@ -8,6 +8,20 @@
|
|
|
| namespace storage {
|
|
|
| +static_assert(kDefaultIPCMemorySize < kDefaultSharedMemorySize,
|
| + "IPC transport size must be smaller than shared memory size.");
|
| +static_assert(kDefaultMinPageFileSize < kDefaultMaxPageFileSize,
|
| + "Min page file size must be less than max.");
|
| +static_assert(kDefaultMinPageFileSize < kDefaultMaxBlobInMemorySpace,
|
| + "Page file size must be less than in-memory space.");
|
| +
|
| +bool BlobStorageLimits::IsValid() const {
|
| + return max_ipc_memory_size < max_shared_memory_size &&
|
| + min_page_file_size < max_file_size &&
|
| + min_page_file_size < max_blob_in_memory_space &&
|
| + effective_max_disk_space <= desired_max_disk_space;
|
| +}
|
| +
|
| bool BlobStatusIsError(BlobStatus status) {
|
| return static_cast<int>(status) <= static_cast<int>(BlobStatus::LAST_ERROR);
|
| }
|
|
|