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

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

Issue 287093004: Revert r271097 - "Add most of the metadata-handling code for blobs." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" 5 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 // Global metadata 40 // Global metadata
41 // --------------- 41 // ---------------
42 // The prefix is <0, 0, 0>, followed by a metadata type byte: 42 // The prefix is <0, 0, 0>, followed by a metadata type byte:
43 // 43 //
44 // <0, 0, 0, 0> => backing store schema version [SchemaVersionKey] 44 // <0, 0, 0, 0> => backing store schema version [SchemaVersionKey]
45 // <0, 0, 0, 1> => maximum allocated database [MaxDatabaseIdKey] 45 // <0, 0, 0, 1> => maximum allocated database [MaxDatabaseIdKey]
46 // <0, 0, 0, 2> => SerializedScriptValue version [DataVersionKey] 46 // <0, 0, 0, 2> => SerializedScriptValue version [DataVersionKey]
47 // <0, 0, 0, 3> 47 // <0, 0, 0, 3>
48 // => Blob journal 48 // => Blob journal
49 // The format of the journal is: 49 // The format of the journal is: {database_id, blobKey}*.
50 // {database_id (var int), blobKey (var int)}*.
51 // If the blobKey is kAllBlobsKey, the whole database should be deleted. 50 // If the blobKey is kAllBlobsKey, the whole database should be deleted.
52 // [BlobJournalKey] 51 // [BlobJournalKey]
53 // <0, 0, 0, 4> => Live blob journal; same format. [LiveBlobJournalKey] 52 // <0, 0, 0, 4> => Live blob journal; same format. [LiveBlobJournalKey]
54 // <0, 0, 0, 100, database id> 53 // <0, 0, 0, 100, database id>
55 // => Existence implies the database id is in the free list 54 // => Existence implies the database id is in the free list
56 // [DatabaseFreeListKey] 55 // [DatabaseFreeListKey]
57 // <0, 0, 0, 201, origin, database name> => Database id [DatabaseNameKey] 56 // <0, 0, 0, 201, origin, database name> => Database id [DatabaseNameKey]
58 // 57 //
59 // 58 //
60 // Database metadata: [DatabaseMetaDataKey] 59 // Database metadata: [DatabaseMetaDataKey]
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 scoped_ptr<IndexedDBKey> IndexDataKey::primary_key() const { 2029 scoped_ptr<IndexedDBKey> IndexDataKey::primary_key() const {
2031 scoped_ptr<IndexedDBKey> key; 2030 scoped_ptr<IndexedDBKey> key;
2032 StringPiece slice(encoded_primary_key_); 2031 StringPiece slice(encoded_primary_key_);
2033 if (!DecodeIDBKey(&slice, &key)) { 2032 if (!DecodeIDBKey(&slice, &key)) {
2034 // TODO(jsbell): Return error. 2033 // TODO(jsbell): Return error.
2035 } 2034 }
2036 return key.Pass(); 2035 return key.Pass();
2037 } 2036 }
2038 2037
2039 } // namespace content 2038 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698