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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system_proxy.h

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
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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_
7 7
8 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" 8 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
9 #include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h" 9 #include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
10 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" 10 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h"
11 11
12 namespace fileapi { 12 namespace fileapi {
13 class FileSystemURL; 13 class FileSystemURL;
14 } 14 }
15 15
16 namespace gdata { 16 namespace gdata {
17 17
18 class GDataEntryProto; 18 class DriveEntryProto;
19 class GDataFileSystemInterface; 19 class GDataFileSystemInterface;
20 20
21 typedef std::vector<DriveEntryProto> DriveEntryProtoVector;
22
21 // Implementation of File API's remote file system proxy for GData file system. 23 // Implementation of File API's remote file system proxy for GData file system.
22 class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface { 24 class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
23 public: 25 public:
24 // |file_system| is the GDataFileSystem instance owned by GDataSystemService. 26 // |file_system| is the GDataFileSystem instance owned by GDataSystemService.
25 explicit GDataFileSystemProxy(GDataFileSystemInterface* file_system); 27 explicit GDataFileSystemProxy(GDataFileSystemInterface* file_system);
26 28
27 // fileapi::RemoteFileSystemProxyInterface overrides. 29 // fileapi::RemoteFileSystemProxyInterface overrides.
28 virtual void GetFileInfo( 30 virtual void GetFileInfo(
29 const fileapi::FileSystemURL& url, 31 const fileapi::FileSystemURL& url,
30 const fileapi::FileSystemOperationInterface::GetMetadataCallback& 32 const fileapi::FileSystemOperationInterface::GetMetadataCallback&
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const fileapi::FileSystemOperationInterface::StatusCallback& callback, 95 const fileapi::FileSystemOperationInterface::StatusCallback& callback,
94 GDataFileError error); 96 GDataFileError error);
95 97
96 // Helper callback for relaying reply for metadata retrieval request to the 98 // Helper callback for relaying reply for metadata retrieval request to the
97 // calling thread. 99 // calling thread.
98 void OnGetMetadata( 100 void OnGetMetadata(
99 const FilePath& file_path, 101 const FilePath& file_path,
100 const fileapi::FileSystemOperationInterface::GetMetadataCallback& 102 const fileapi::FileSystemOperationInterface::GetMetadataCallback&
101 callback, 103 callback,
102 GDataFileError error, 104 GDataFileError error,
103 scoped_ptr<GDataEntryProto> entry_proto); 105 scoped_ptr<DriveEntryProto> entry_proto);
104 106
105 // Helper callback for relaying reply for GetEntryInfoByPath() to the 107 // Helper callback for relaying reply for GetEntryInfoByPath() to the
106 // calling thread. 108 // calling thread.
107 void OnGetEntryInfoByPath( 109 void OnGetEntryInfoByPath(
108 const FilePath& entry_path, 110 const FilePath& entry_path,
109 const fileapi::FileSystemOperationInterface::SnapshotFileCallback& 111 const fileapi::FileSystemOperationInterface::SnapshotFileCallback&
110 callback, 112 callback,
111 GDataFileError error, 113 GDataFileError error,
112 scoped_ptr<GDataEntryProto> entry_proto); 114 scoped_ptr<DriveEntryProto> entry_proto);
113 115
114 // Helper callback for relaying reply for ReadDirectory() to the calling 116 // Helper callback for relaying reply for ReadDirectory() to the calling
115 // thread. 117 // thread.
116 void OnReadDirectory( 118 void OnReadDirectory(
117 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback& 119 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback&
118 callback, 120 callback,
119 GDataFileError error, 121 GDataFileError error,
120 bool hide_hosted_documents, 122 bool hide_hosted_documents,
121 scoped_ptr<GDataEntryProtoVector> proto_entries); 123 scoped_ptr<DriveEntryProtoVector> proto_entries);
122 124
123 // Helper callback for relaying reply for CreateWritableSnapshotFile() to 125 // Helper callback for relaying reply for CreateWritableSnapshotFile() to
124 // the calling thread. 126 // the calling thread.
125 void OnCreateWritableSnapshotFile( 127 void OnCreateWritableSnapshotFile(
126 const FilePath& virtual_path, 128 const FilePath& virtual_path,
127 const fileapi::WritableSnapshotFile& callback, 129 const fileapi::WritableSnapshotFile& callback,
128 GDataFileError result, 130 GDataFileError result,
129 const FilePath& local_path); 131 const FilePath& local_path);
130 132
131 // Helper callback for closing the local cache file and committing the dirty 133 // Helper callback for closing the local cache file and committing the dirty
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // GDataFileSystem is owned by Profile, which outlives GDataFileSystemProxy, 183 // GDataFileSystem is owned by Profile, which outlives GDataFileSystemProxy,
182 // which is owned by CrosMountPointProvider (i.e. by the time Profile is 184 // which is owned by CrosMountPointProvider (i.e. by the time Profile is
183 // removed, the file manager is already gone). Hence it's safe to use this as 185 // removed, the file manager is already gone). Hence it's safe to use this as
184 // a raw pointer. 186 // a raw pointer.
185 GDataFileSystemInterface* file_system_; 187 GDataFileSystemInterface* file_system_;
186 }; 188 };
187 189
188 } // namespace chromeos 190 } // namespace chromeos
189 191
190 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ 192 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_interface.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698