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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 static const int64 kSpecialIndexNumber; | 425 static const int64 kSpecialIndexNumber; |
426 | 426 |
427 private: | 427 private: |
428 static std::string Encode(int64 database_id, | 428 static std::string Encode(int64 database_id, |
429 int64 object_store_id, | 429 int64 object_store_id, |
430 const std::string& encoded_user_key); | 430 const std::string& encoded_user_key); |
431 int64 database_id_; | 431 int64 database_id_; |
432 int64 object_store_id_; | 432 int64 object_store_id_; |
433 // This is the user's ObjectStoreDataKey, not the BlobEntryKey itself. | 433 // This is the user's ObjectStoreDataKey, not the BlobEntryKey itself. |
434 std::string encoded_user_key_; | 434 std::string encoded_user_key_; |
435 DISALLOW_COPY_AND_ASSIGN(BlobEntryKey); | |
436 }; | 435 }; |
437 | 436 |
438 class IndexDataKey { | 437 class IndexDataKey { |
439 public: | 438 public: |
440 IndexDataKey(); | 439 IndexDataKey(); |
441 ~IndexDataKey(); | 440 ~IndexDataKey(); |
442 static bool Decode(base::StringPiece* slice, IndexDataKey* result); | 441 static bool Decode(base::StringPiece* slice, IndexDataKey* result); |
443 CONTENT_EXPORT static std::string Encode( | 442 CONTENT_EXPORT static std::string Encode( |
444 int64 database_id, | 443 int64 database_id, |
445 int64 object_store_id, | 444 int64 object_store_id, |
(...skipping 29 matching lines...) Expand all Loading... |
475 std::string encoded_user_key_; | 474 std::string encoded_user_key_; |
476 std::string encoded_primary_key_; | 475 std::string encoded_primary_key_; |
477 int64 sequence_number_; | 476 int64 sequence_number_; |
478 | 477 |
479 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); | 478 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); |
480 }; | 479 }; |
481 | 480 |
482 } // namespace content | 481 } // namespace content |
483 | 482 |
484 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ | 483 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ |
OLD | NEW |