Chromium Code Reviews| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 // incompatible change is made to the DB format. kDBVersion in | 151 // incompatible change is made to the DB format. kDBVersion in |
| 152 // drive_resource_metadata_storage.h defines the current version. | 152 // drive_resource_metadata_storage.h defines the current version. |
| 153 optional int32 version = 1; | 153 optional int32 version = 1; |
| 154 optional int64 largest_changestamp = 2; | 154 optional int64 largest_changestamp = 2; |
| 155 | 155 |
| 156 // True if resources already have been updated after 'starred' property added. | 156 // True if resources already have been updated after 'starred' property added. |
| 157 // Otherwise, we have to load them from server. | 157 // Otherwise, we have to load them from server. |
| 158 optional bool starred_property_initialized = 3; | 158 optional bool starred_property_initialized = 3; |
| 159 } | 159 } |
| 160 | 160 |
| 161 // Represents metadata of a Team Drive. | |
| 162 message TeamDriveChange { | |
|
hashimoto
2017/04/06 10:23:36
IIUC this object never gets serialized.
So this do
yamaguchi
2017/04/07 03:57:44
Changed not to use this intermediate data structur
| |
| 163 // Name of the Team Drive. Also used as the title of the entry. | |
| 164 // See the comment at |base_name| of ResourceEntry. | |
| 165 optional string name = 1; | |
| 166 | |
| 167 // Resource ID of the entry. Guaranteed to be unique. | |
| 168 optional string id = 2; | |
| 169 | |
| 170 // Local ID of the entry. | |
| 171 optional string local_id = 3; | |
| 172 | |
| 173 // This field is used for processing the change list from the | |
| 174 // server. Deleted entries won't be stored in ResourceMetadata. | |
| 175 optional bool deleted = 4; | |
| 176 | |
| 177 // The time of the last modification. | |
| 178 optional int64 modification_date = 5; | |
| 179 } | |
| 180 | |
| 161 // Message to store information of an existing cache file. | 181 // Message to store information of an existing cache file. |
| 162 message FileCacheEntry { | 182 message FileCacheEntry { |
| 163 // MD5 of the cache file. | 183 // MD5 of the cache file. |
| 164 optional string md5 = 1; | 184 optional string md5 = 1; |
| 165 | 185 |
| 166 // True if the file is present locally. | 186 // True if the file is present locally. |
| 167 optional bool is_present = 2; | 187 optional bool is_present = 2; |
| 168 | 188 |
| 169 // True if the file is pinned (i.e. available offline). | 189 // True if the file is pinned (i.e. available offline). |
| 170 optional bool is_pinned = 3; | 190 optional bool is_pinned = 3; |
| 171 | 191 |
| 172 // True if the file is dirty (i.e. modified locally). | 192 // True if the file is dirty (i.e. modified locally). |
| 173 optional bool is_dirty = 4; | 193 optional bool is_dirty = 4; |
| 174 | 194 |
| 175 // When adding a new state, be sure to update TestFileCacheState and test | 195 // When adding a new state, be sure to update TestFileCacheState and test |
| 176 // functions defined in test_util.cc. | 196 // functions defined in test_util.cc. |
| 177 } | 197 } |
| OLD | NEW |