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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata.proto

Issue 10836354: Rename GData* to Drive* in gdata.proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for comments. Created 8 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // Protocol buffer definitions for serializing GData files and directories.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 package gdata;
12
13 // Represents base::PlatformFileInfo.
14 message PlatformFileInfoProto {
15 optional int64 size = 1;
16 optional bool is_directory = 2;
17 optional bool is_symbolic_link = 3;
18 optional int64 last_modified = 4;
19 optional int64 last_accessed = 5;
20 optional int64 creation_time = 6;
21 }
22
23 // File specific info, which is a part of GDataEntryProto.
24 message GDataFileSpecificInfo {
25 // This URL points to a thumbnail image. The thumbnail URL is not permanent
26 // as it's not protected by authentication. See crbug.com/127697 for how
27 // stale thumbnail URLs are handled.
28 optional string thumbnail_url = 1;
29
30 // This URL is used for opening hosted documents with Google Docs's web
31 // interface.
32 optional string alternate_url = 2;
33
34 // Content mime type like "text/plain".
35 optional string content_mime_type = 3;
36
37 // The MD5 of contents of a regular file.
38 optional string file_md5 = 4;
39
40 // File extension, including the dot, used for hosted documents
41 // (ex. ".gsheet" for hosted spreadsheet documents).
42 optional string document_extension = 5;
43
44 // True if the file is a hosted document.
45 optional bool is_hosted_document = 6;
46 }
47
48 // Represents GDataEntry, GDataFile, and GDataDirectory without children.
49 message GDataEntryProto {
50 optional PlatformFileInfoProto file_info = 1;
51 optional string base_name = 2;
52 optional string title = 3;
53 optional string resource_id = 4;
54 optional string edit_url = 5;
55 optional string content_url = 6;
56 optional string parent_resource_id = 7;
57 // For a file, this is "resumable-edit-media" URL, used to update an
58 // existing file. For a directory, this is "resumable-create-media" URL,
59 // used to upload a new file to that directory. See
60 // https://developers.google.com/google-apps/documents-list/
61 optional string upload_url = 8;
62
63 // File specific information, such as MD5.
64 optional GDataFileSpecificInfo file_specific_info = 9;
65 }
66
67 // Represents GDataDirectory. This message type is defined to keep children
68 // separate from GDataEntryProto. This design allows us to get the metadata
69 // of a directory efficiently as GDataEntryProto, without carrying the
70 // metadata of children.
71 //
72 // TODO(satorux): With the new metadata storage system, we plan to store
73 // children as pairs of base name and resource ID. We should remove this
74 // message type once we get there.
75 message GDataDirectoryProto {
76 optional GDataEntryProto gdata_entry = 1;
77 repeated GDataDirectoryProto child_directories = 7;
78 repeated GDataEntryProto child_files = 9;
79 }
80
81 // Container for the root directory and the largest changestamp.
82 // TODO(satorux): Remove this: crbug.com/137862
83 message GDataRootDirectoryProto {
84 optional GDataDirectoryProto gdata_directory = 1;
85 optional int64 largest_changestamp = 4;
86 // Monotonically increasing version number, which is changed when
87 // incompatible change is made in the proto file.
88 // kProtoVersion in gdata_files.h defines the current version.
89 optional int32 version = 3;
90 }
91
92 // Message to store information of an existing cache file.
93 // Cache files are stored in 'tmp' or 'persistent' directory under the
94 // root cache directory. See GDataCache::GetCacheRootPath().
95 message GDataCacheEntry {
96 // MD5 of the cache file. "local" if the file is locally modified.
97 optional string md5 = 1;
98
99 // True if the file is present locally.
100 optional bool is_present = 2;
101
102 // True if the file is pinned (i.e. available offline).
103 optional bool is_pinned = 3;
104
105 // True if the file is dirty (i.e. modified locally).
106 optional bool is_dirty = 4;
107
108 // True if the file is a mounted archive file.
109 optional bool is_mounted = 5;
110
111 // True if the file is in the persistent directory.
112 optional bool is_persistent = 6;
113
114 // When adding a new state, be sure to update TestGDataCacheState and test
115 // functions defined in gdata_test_util.cc.
116 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_task_executor.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698