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

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: linkage fix 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 unified diff | Download patch
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 #include "storage/common/storage_common_export.h"
9
10 namespace storage {
11
12 // TODO(michaeln): use base::SysInfo::AmountOfPhysicalMemoryMB() in some
13 // way to come up with a better limit.
14 constexpr int64 kBlobStorageMaxMemoryUsage = 500 * 1024 * 1024; // Half a gig.
15 constexpr size_t kBlobStorageIPCThresholdBytes = 250 * 1024;
16 constexpr size_t kBlobStorageMaxSharedMemoryBytes = 10 * 1024 * 1024;
17 constexpr uint64_t kBlobStorageMaxFileSizeBytes = 100 * 1024 * 1024;
18 constexpr uint64_t kBlobStorageMinFileSizeBytes = 1 * 1024 * 1024;
19 constexpr size_t kBlobStorageMaxBlobMemorySize =
kinuko 2015/10/16 14:24:13 constexpr is not allowed in chromium yet.
dmurph 2015/10/16 21:37:30 ok
20 kBlobStorageMaxMemoryUsage - kBlobStorageMinFileSizeBytes;
21
22 STORAGE_COMMON_EXPORT enum class IPCBlobItemRequestStrategy {
23 UNKNOWN = 0,
24 IPC,
25 SHARED_MEMORY,
26 FILE,
27 LAST = FILE
28 };
29
30 STORAGE_COMMON_EXPORT enum class IPCBlobCreationCancelCode {
31 UNKNOWN = 0,
32 OUT_OF_MEMORY,
33 FILE_WRITE_FAILED,
34 LAST = FILE_WRITE_FAILED
35 };
36
37 } // namespace storage
38
39 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698