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

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

Issue 2552153002: [BlobStorage] Enabling disk paging and direct storage. (Closed)
Patch Set: Comments from Mark 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: 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);
}

Powered by Google App Engine
This is Rietveld 408576698