OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ |
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/nullable_string16.h" | 12 #include "base/nullable_string16.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 | 14 |
| 15 // Note: This flag should remain undefined until we're |
| 16 // ready to use the new backend in chrome and test_shell/DRT. |
| 17 // This allows us to commit changes behind the flag incrementally |
| 18 // on trunk, and to enable it in interim snapshots for try runs, |
| 19 // but to not affect the real build until its ready. |
| 20 #undef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 21 |
15 namespace dom_storage { | 22 namespace dom_storage { |
16 | 23 |
17 // The quota for each storage area. Suggested by the spec. | 24 // The quota for each storage area. Suggested by the spec. |
18 const size_t kPerAreaQuota = 5 * 1024 * 1024; | 25 const size_t kPerAreaQuota = 5 * 1024 * 1024; |
19 | 26 |
20 // Value to indicate the localstorage namespace vs non-zero | 27 // Value to indicate the localstorage namespace vs non-zero |
21 // values for sessionstorage namespaces. | 28 // values for sessionstorage namespaces. |
22 const int64 kLocalStorageNamespaceId = 0; | 29 const int64 kLocalStorageNamespaceId = 0; |
23 | 30 |
24 // Value to indicate an area that not be opened. | 31 // Value to indicate an area that not be opened. |
25 const int kInvalidAreaId = -1; | 32 const int kInvalidAreaId = -1; |
26 | 33 |
27 typedef std::map<string16, NullableString16> ValuesMap; | 34 typedef std::map<string16, NullableString16> ValuesMap; |
28 | 35 |
29 } // namespace dom_storage | 36 } // namespace dom_storage |
30 | 37 |
31 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ | 38 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_TYPES_H_ |
OLD | NEW |