OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 base::string16 origin_; // TODO(jsbell): Store encoded strings, or just | 230 base::string16 origin_; // TODO(jsbell): Store encoded strings, or just |
231 // pointers. | 231 // pointers. |
232 base::string16 database_name_; | 232 base::string16 database_name_; |
233 }; | 233 }; |
234 | 234 |
235 class DatabaseMetaDataKey { | 235 class DatabaseMetaDataKey { |
236 public: | 236 public: |
237 enum MetaDataType { | 237 enum MetaDataType { |
238 ORIGIN_NAME = 0, | 238 ORIGIN_NAME = 0, |
239 DATABASE_NAME = 1, | 239 DATABASE_NAME = 1, |
240 USER_VERSION = 2, // Obsolete | 240 USER_STRING_VERSION = 2, // Obsolete |
241 MAX_OBJECT_STORE_ID = 3, | 241 MAX_OBJECT_STORE_ID = 3, |
242 USER_INT_VERSION = 4, | 242 USER_VERSION = 4, |
243 BLOB_KEY_GENERATOR_CURRENT_NUMBER = 5, | 243 BLOB_KEY_GENERATOR_CURRENT_NUMBER = 5, |
244 MAX_SIMPLE_METADATA_TYPE = 6 | 244 MAX_SIMPLE_METADATA_TYPE = 6 |
245 }; | 245 }; |
246 | 246 |
247 CONTENT_EXPORT static const int64_t kAllBlobsKey; | 247 CONTENT_EXPORT static const int64_t kAllBlobsKey; |
248 static const int64_t kBlobKeyGeneratorInitialNumber; | 248 static const int64_t kBlobKeyGeneratorInitialNumber; |
249 // All keys <= 0 are invalid. This one's just a convenient example. | 249 // All keys <= 0 are invalid. This one's just a convenient example. |
250 static const int64_t kInvalidBlobKey; | 250 static const int64_t kInvalidBlobKey; |
251 | 251 |
252 static bool IsValidBlobKey(int64_t blob_key); | 252 static bool IsValidBlobKey(int64_t blob_key); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 std::string encoded_user_key_; | 490 std::string encoded_user_key_; |
491 std::string encoded_primary_key_; | 491 std::string encoded_primary_key_; |
492 int64_t sequence_number_; | 492 int64_t sequence_number_; |
493 | 493 |
494 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); | 494 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); |
495 }; | 495 }; |
496 | 496 |
497 } // namespace content | 497 } // namespace content |
498 | 498 |
499 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ | 499 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ |
OLD | NEW |