| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 syntax = "proto2"; | |
| 6 | |
| 7 option optimize_for = LITE_RUNTIME; | |
| 8 option retain_unknown_fields = true; | |
| 9 | |
| 10 package attachment_store_pb; | |
| 11 | |
| 12 // Metadata for leveldb attachment store database. | |
| 13 message StoreMetadata { | |
| 14 // |schema_version| indicates format in which data is written in attachment | |
| 15 // store. Needed for upgrade and to prevent newer data from being loaded by | |
| 16 // older code that doesn't understand it. | |
| 17 optional int32 schema_version = 1; | |
| 18 } | |
| 19 | |
| 20 // Metadata for attachment in attachment store. Storing metadata in separate | |
| 21 // record from actual data allows us to enumerate attachments in the store | |
| 22 // without incurring cost to read actual data. It also allows us to update | |
| 23 // attachment metadata independent of the data. | |
| 24 message RecordMetadata { | |
| 25 // Size of attachment data. Useful for attachment store space management. | |
| 26 optional int64 attachment_size = 1; | |
| 27 // Crc32c of attachment data. | |
| 28 optional fixed32 crc32c = 2; | |
| 29 | |
| 30 // Component enum mirrors values of AttachmentStore::Component. | |
| 31 enum Component { | |
| 32 UNKNOWN = 0; | |
| 33 MODEL_TYPE = 1; | |
| 34 SYNC = 2; | |
| 35 } | |
| 36 // Set of components that reference this attachment. | |
| 37 repeated Component component = 3; | |
| 38 } | |
| OLD | NEW |