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