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

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

Issue 2552153002: [BlobStorage] Enabling disk paging and direct storage. (Closed)
Patch Set: forgot some comments 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: 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..471a4e8c7121998ab840f22d531e381c7479cf7e 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 <= desired_max_disk;
+}
+
bool BlobStatusIsError(BlobStatus status) {
return static_cast<int>(status) <= static_cast<int>(BlobStatus::LAST_ERROR);
}

Powered by Google App Engine
This is Rietveld 408576698