1 // Copyright 2013 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.
5 #ifndef CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_TYPES_H_
6 #define CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_TYPES_H_
10 #include "base/basictypes.h"
11 #include "base/strings/nullable_string16.h"
12 #include "base/strings/string16.h"
13 #include "base/time/time.h"
18 typedef std::map<base::string16, base::NullableString16> DOMStorageValuesMap;
20 // The quota for each storage area.
21 // This value is enforced in renderer processes and the browser process.
22 const size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
24 // In the browser process we allow some overage to
25 // accomodate concurrent writes from different renderers
26 // that were allowed because the limit imposed in the renderer
28 const size_t kPerStorageAreaOverQuotaAllowance = 100 * 1024;
30 // Value to indicate the localstorage namespace vs non-zero
31 // values for sessionstorage namespaces.
32 const int64 kLocalStorageNamespaceId = 0;
34 const int64 kInvalidSessionStorageNamespaceId = kLocalStorageNamespaceId;
36 // Start purging memory if the number of in-memory areas exceeds this.
37 const int64 kMaxInMemoryStorageAreas = 100;
39 } // namespace content
41 #endif // CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_TYPES_H_