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

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

Issue 1288373002: [BlobAsync] Patch 2: Common Constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async1
Patch Set: comments Created 5 years, 2 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
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.cc ('k') | storage/common/data_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..ddf97ec00f626714d53df38ee1cb13198447af84
--- /dev/null
+++ b/storage/common/blob_storage/blob_storage_constants.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_
+#define STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_
+
+namespace storage {
+
+// TODO(michaeln): use base::SysInfo::AmountOfPhysicalMemoryMB() in some
+// way to come up with a better limit.
+const int64 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;
+
+enum class IPCBlobItemRequestStrategy {
+ UNKNOWN = 0,
+ IPC,
+ SHARED_MEMORY,
+ FILE,
+ LAST = FILE
+};
+
+enum class IPCBlobCreationCancelCode {
+ UNKNOWN = 0,
+ OUT_OF_MEMORY,
+ FILE_WRITE_FAILED,
+ LAST = FILE_WRITE_FAILED
+};
+
+} // namespace storage
+
+#endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.cc ('k') | storage/common/data_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698