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

Side by Side 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, 1 month 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.cc ('k') | storage/common/data_element.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« 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