Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1302)

Side by Side Diff: content/browser/indexed_db/indexed_db_leveldb_coding.h

Issue 197023009: Add IndexedDBBlobInfo class, to be used for IDB Blob support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make clang happy. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 enum MetaDataType { 222 enum MetaDataType {
223 ORIGIN_NAME = 0, 223 ORIGIN_NAME = 0,
224 DATABASE_NAME = 1, 224 DATABASE_NAME = 1,
225 USER_VERSION = 2, 225 USER_VERSION = 2,
226 MAX_OBJECT_STORE_ID = 3, 226 MAX_OBJECT_STORE_ID = 3,
227 USER_INT_VERSION = 4, 227 USER_INT_VERSION = 4,
228 BLOB_KEY_GENERATOR_CURRENT_NUMBER = 5, 228 BLOB_KEY_GENERATOR_CURRENT_NUMBER = 5,
229 MAX_SIMPLE_METADATA_TYPE = 6 229 MAX_SIMPLE_METADATA_TYPE = 6
230 }; 230 };
231 231
232 static const int64 kAllBlobsKey = 1; 232 static const int64 kAllBlobsKey;
233 static const int64 kBlobKeyGeneratorInitialNumber = 2; 233 static const int64 kBlobKeyGeneratorInitialNumber;
234 static const int64 kInvalidBlobKey = -1; // All keys <= 0 are invalid. 234 // All keys <= 0 are invalid. This one's just a convenient example.
235 static const int64 kInvalidBlobKey;
235 236
236 static bool IsValidBlobKey(int64 blobKey); 237 static bool IsValidBlobKey(int64 blobKey);
237 CONTENT_EXPORT static std::string Encode(int64 database_id, 238 CONTENT_EXPORT static std::string Encode(int64 database_id,
238 MetaDataType type); 239 MetaDataType type);
239 }; 240 };
240 241
241 class ObjectStoreMetaDataKey { 242 class ObjectStoreMetaDataKey {
242 public: 243 public:
243 enum MetaDataType { 244 enum MetaDataType {
244 NAME = 0, 245 NAME = 0,
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 std::string encoded_user_key_; 475 std::string encoded_user_key_;
475 std::string encoded_primary_key_; 476 std::string encoded_primary_key_;
476 int64 sequence_number_; 477 int64 sequence_number_;
477 478
478 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); 479 DISALLOW_COPY_AND_ASSIGN(IndexDataKey);
479 }; 480 };
480 481
481 } // namespace content 482 } // namespace content
482 483
483 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ 484 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_blob_info.cc ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698