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

Side by Side Diff: storage/common/blob_storage/blob_storage_constants.h

Issue 1528233004: [Blob] Blob paging to disk patch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blob-disk1
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.h ('k') | storage/storage_browser.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.h ('k') | storage/storage_browser.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698