OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ |
| 6 #define STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ |
| 7 |
| 8 namespace storage { |
| 9 |
| 10 // TODO(michaeln): use base::SysInfo::AmountOfPhysicalMemoryMB() in some |
| 11 // way to come up with a better limit. |
| 12 const int64 kBlobStorageMaxMemoryUsage = 500 * 1024 * 1024; // Half a gig. |
| 13 const size_t kBlobStorageIPCThresholdBytes = 250 * 1024; |
| 14 const size_t kBlobStorageMaxSharedMemoryBytes = 10 * 1024 * 1024; |
| 15 const uint64_t kBlobStorageMaxFileSizeBytes = 100 * 1024 * 1024; |
| 16 const uint64_t kBlobStorageMinFileSizeBytes = 1 * 1024 * 1024; |
| 17 const size_t kBlobStorageMaxBlobMemorySize = |
| 18 kBlobStorageMaxMemoryUsage - kBlobStorageMinFileSizeBytes; |
| 19 |
| 20 enum class IPCBlobItemRequestStrategy { |
| 21 UNKNOWN = 0, |
| 22 IPC, |
| 23 SHARED_MEMORY, |
| 24 FILE, |
| 25 LAST = FILE |
| 26 }; |
| 27 |
| 28 enum class IPCBlobCreationCancelCode { |
| 29 UNKNOWN = 0, |
| 30 OUT_OF_MEMORY, |
| 31 FILE_WRITE_FAILED, |
| 32 LAST = FILE_WRITE_FAILED |
| 33 }; |
| 34 |
| 35 } // namespace storage |
| 36 |
| 37 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ |
OLD | NEW |