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

Unified Diff: storage/common/blob_storage/blob_storage_constants.h

Issue 2855943003: Reduce the in-memory blob storgae limit on Android (Closed)
Patch Set: Fix IndexedDBBrowserTest. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: storage/common/blob_storage/blob_storage_constants.h
diff --git a/storage/common/blob_storage/blob_storage_constants.h b/storage/common/blob_storage/blob_storage_constants.h
index a606397eede4a8710ccb224616ae08c4eec55a02..f51b012bc07c7b9570688eb9d516b4dd557b4516 100644
--- a/storage/common/blob_storage/blob_storage_constants.h
+++ b/storage/common/blob_storage/blob_storage_constants.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include "base/callback_forward.h"
+#include "build/build_config.h"
#include "storage/common/storage_common_export.h"
namespace storage {
@@ -17,9 +18,15 @@ constexpr size_t kDefaultIPCMemorySize = 250u * 1024;
constexpr size_t kDefaultSharedMemorySize = 10u * 1024 * 1024;
constexpr size_t kDefaultMaxBlobInMemorySpace = 500u * 1024 * 1024;
constexpr uint64_t kDefaultMaxBlobDiskSpace = 0ull;
-constexpr uint64_t kDefaultMinPageFileSize = 5ull * 1024 * 1024;
constexpr uint64_t kDefaultMaxPageFileSize = 100ull * 1024 * 1024;
+#if defined(OS_ANDROID)
+// On minimal Android maximum in-memory space can be as low as 5MB.
+constexpr uint64_t kDefaultMinPageFileSize = 5ull * 1024 * 1024 / 2;
+#else
+constexpr uint64_t kDefaultMinPageFileSize = 5ull * 1024 * 1024;
+#endif
+
// All sizes are in bytes.
struct STORAGE_COMMON_EXPORT BlobStorageLimits {
// Returns if the current configuration is valid.

Powered by Google App Engine
This is Rietveld 408576698