| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Protocol buffer definitions for representing Drive files and directories, | 5 // Protocol buffer definitions for representing Drive files and directories, |
| 6 // and serializing them for the resource metadata database. | 6 // and serializing them for the resource metadata database. |
| 7 | 7 |
| 8 syntax = "proto2"; | 8 syntax = "proto2"; |
| 9 | 9 |
| 10 option optimize_for = LITE_RUNTIME; | 10 option optimize_for = LITE_RUNTIME; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Local ID of the entry. | 102 // Local ID of the entry. |
| 103 optional string local_id = 15; | 103 optional string local_id = 15; |
| 104 | 104 |
| 105 // Local ID of the parent entry. | 105 // Local ID of the parent entry. |
| 106 optional string parent_local_id = 7; | 106 optional string parent_local_id = 7; |
| 107 | 107 |
| 108 // This field is used for processing the change list from the | 108 // This field is used for processing the change list from the |
| 109 // server. Deleted entries won't be stored in ResourceMetadata. | 109 // server. Deleted entries won't be stored in ResourceMetadata. |
| 110 optional bool deleted = 11; | 110 optional bool deleted = 11; |
| 111 | 111 |
| 112 // True if the entry is labeled "starred". |
| 113 optional bool starred = 20; |
| 114 |
| 112 // True if the entry is labeled with "shared-with-me", i.e., owned by someone | 115 // True if the entry is labeled with "shared-with-me", i.e., owned by someone |
| 113 // else initially and later shared to the current user. | 116 // else initially and later shared to the current user. |
| 114 optional bool shared_with_me = 14; | 117 optional bool shared_with_me = 14; |
| 115 | 118 |
| 116 // True if the entry is labeled "shared". Either the entry itself or its | 119 // True if the entry is labeled "shared". Either the entry itself or its |
| 117 // ancestor is shared (to the user from / by the user to) other accounts. | 120 // ancestor is shared (to the user from / by the user to) other accounts. |
| 118 optional bool shared = 17; | 121 optional bool shared = 17; |
| 119 | 122 |
| 120 // File specific information, such as MD5. | 123 // File specific information, such as MD5. |
| 121 optional FileSpecificInfo file_specific_info = 9; | 124 optional FileSpecificInfo file_specific_info = 9; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 142 repeated Property new_properties = 19; | 145 repeated Property new_properties = 19; |
| 143 } | 146 } |
| 144 | 147 |
| 145 // Container for the header part of ResourceMetadata. | 148 // Container for the header part of ResourceMetadata. |
| 146 message ResourceMetadataHeader { | 149 message ResourceMetadataHeader { |
| 147 // Monotonically increasing version number, which is changed when | 150 // Monotonically increasing version number, which is changed when |
| 148 // incompatible change is made to the DB format. kDBVersion in | 151 // incompatible change is made to the DB format. kDBVersion in |
| 149 // drive_resource_metadata_storage.h defines the current version. | 152 // drive_resource_metadata_storage.h defines the current version. |
| 150 optional int32 version = 1; | 153 optional int32 version = 1; |
| 151 optional int64 largest_changestamp = 2; | 154 optional int64 largest_changestamp = 2; |
| 155 |
| 156 // True if resources already have been updated after 'starred' property added. |
| 157 // Otherwise, we have to load them from server. |
| 158 optional bool has_starred = 3; |
| 152 } | 159 } |
| 153 | 160 |
| 154 // Message to store information of an existing cache file. | 161 // Message to store information of an existing cache file. |
| 155 message FileCacheEntry { | 162 message FileCacheEntry { |
| 156 // MD5 of the cache file. | 163 // MD5 of the cache file. |
| 157 optional string md5 = 1; | 164 optional string md5 = 1; |
| 158 | 165 |
| 159 // True if the file is present locally. | 166 // True if the file is present locally. |
| 160 optional bool is_present = 2; | 167 optional bool is_present = 2; |
| 161 | 168 |
| 162 // True if the file is pinned (i.e. available offline). | 169 // True if the file is pinned (i.e. available offline). |
| 163 optional bool is_pinned = 3; | 170 optional bool is_pinned = 3; |
| 164 | 171 |
| 165 // True if the file is dirty (i.e. modified locally). | 172 // True if the file is dirty (i.e. modified locally). |
| 166 optional bool is_dirty = 4; | 173 optional bool is_dirty = 4; |
| 167 | 174 |
| 168 // When adding a new state, be sure to update TestFileCacheState and test | 175 // When adding a new state, be sure to update TestFileCacheState and test |
| 169 // functions defined in test_util.cc. | 176 // functions defined in test_util.cc. |
| 170 } | 177 } |
| OLD | NEW |