| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 int64 IndexId() const; | 318 int64 IndexId() const; |
| 319 | 319 |
| 320 private: | 320 private: |
| 321 int64 object_store_id_; | 321 int64 object_store_id_; |
| 322 int64 index_id_; | 322 int64 index_id_; |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 class ObjectStoreNamesKey { | 325 class ObjectStoreNamesKey { |
| 326 public: | 326 public: |
| 327 // TODO(jsbell): We never use this to look up object store ids, | 327 // TODO(jsbell): We never use this to look up object store ids, |
| 328 // because a mapping is kept in the IndexedDBDatabaseImpl. Can the | 328 // because a mapping is kept in the IndexedDBDatabase. Can the |
| 329 // mapping become unreliable? Can we remove this? | 329 // mapping become unreliable? Can we remove this? |
| 330 static const char* Decode(const char* start, | 330 static const char* Decode(const char* start, |
| 331 const char* limit, | 331 const char* limit, |
| 332 ObjectStoreNamesKey* result); | 332 ObjectStoreNamesKey* result); |
| 333 CONTENT_EXPORT static std::vector<char> Encode( | 333 CONTENT_EXPORT static std::vector<char> Encode( |
| 334 int64 database_id, | 334 int64 database_id, |
| 335 const string16& object_store_name); | 335 const string16& object_store_name); |
| 336 int Compare(const ObjectStoreNamesKey& other); | 336 int Compare(const ObjectStoreNamesKey& other); |
| 337 string16 object_store_name() const { return object_store_name_; } | 337 string16 object_store_name() const { return object_store_name_; } |
| 338 | 338 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 std::vector<char> encoded_user_key_; | 446 std::vector<char> encoded_user_key_; |
| 447 std::vector<char> encoded_primary_key_; | 447 std::vector<char> encoded_primary_key_; |
| 448 int64 sequence_number_; | 448 int64 sequence_number_; |
| 449 | 449 |
| 450 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); | 450 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); |
| 451 }; | 451 }; |
| 452 | 452 |
| 453 } // namespace content | 453 } // namespace content |
| 454 | 454 |
| 455 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ | 455 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ |
| OLD | NEW |