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 #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" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Checks if a given |url| belongs to this file system. If it does, | 87 // Checks if a given |url| belongs to this file system. If it does, |
88 // the call will return true and fill in |file_path| with a file path of | 88 // the call will return true and fill in |file_path| with a file path of |
89 // a corresponding element within this file system. | 89 // a corresponding element within this file system. |
90 static bool ValidateUrl(const fileapi::FileSystemURL& url, | 90 static bool ValidateUrl(const fileapi::FileSystemURL& url, |
91 FilePath* file_path); | 91 FilePath* file_path); |
92 | 92 |
93 // Helper callback for relaying reply for status callbacks to the | 93 // Helper callback for relaying reply for status callbacks to the |
94 // calling thread. | 94 // calling thread. |
95 void OnStatusCallback( | 95 void OnStatusCallback( |
96 const fileapi::FileSystemOperationInterface::StatusCallback& callback, | 96 const fileapi::FileSystemOperationInterface::StatusCallback& callback, |
97 gdata::GDataFileError error); | 97 GDataFileError error); |
98 | 98 |
99 // Helper callback for relaying reply for metadata retrieval request to the | 99 // Helper callback for relaying reply for metadata retrieval request to the |
100 // calling thread. | 100 // calling thread. |
101 void OnGetMetadata( | 101 void OnGetMetadata( |
102 const FilePath& file_path, | 102 const FilePath& file_path, |
103 const fileapi::FileSystemOperationInterface::GetMetadataCallback& | 103 const fileapi::FileSystemOperationInterface::GetMetadataCallback& |
104 callback, | 104 callback, |
105 GDataFileError error, | 105 GDataFileError error, |
106 scoped_ptr<gdata::GDataEntryProto> entry_proto); | 106 scoped_ptr<GDataEntryProto> entry_proto); |
107 | 107 |
108 // Helper callback for relaying reply for GetEntryInfoByPath() to the | 108 // Helper callback for relaying reply for GetEntryInfoByPath() to the |
109 // calling thread. | 109 // calling thread. |
110 void OnGetEntryInfoByPath( | 110 void OnGetEntryInfoByPath( |
111 const FilePath& entry_path, | 111 const FilePath& entry_path, |
112 const fileapi::FileSystemOperationInterface::SnapshotFileCallback& | 112 const fileapi::FileSystemOperationInterface::SnapshotFileCallback& |
113 callback, | 113 callback, |
114 GDataFileError error, | 114 GDataFileError error, |
115 scoped_ptr<GDataEntryProto> entry_proto); | 115 scoped_ptr<GDataEntryProto> entry_proto); |
116 | 116 |
117 // Helper callback for relaying reply for ReadDirectory() to the calling | 117 // Helper callback for relaying reply for ReadDirectory() to the calling |
118 // thread. | 118 // thread. |
119 void OnReadDirectory( | 119 void OnReadDirectory( |
120 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback& | 120 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback& |
121 callback, | 121 callback, |
122 GDataFileError error, | 122 GDataFileError error, |
123 scoped_ptr<gdata::GDataEntryProtoVector> proto_entries); | 123 scoped_ptr<GDataEntryProtoVector> proto_entries); |
124 | 124 |
125 // Helper callback for relaying reply for CreateWritableSnapshotFile() to | 125 // Helper callback for relaying reply for CreateWritableSnapshotFile() to |
126 // the calling thread. | 126 // the calling thread. |
127 void OnCreateWritableSnapshotFile( | 127 void OnCreateWritableSnapshotFile( |
128 const FilePath& virtual_path, | 128 const FilePath& virtual_path, |
129 const fileapi::WritableSnapshotFile& callback, | 129 const fileapi::WritableSnapshotFile& callback, |
130 GDataFileError result, | 130 GDataFileError result, |
131 const FilePath& local_path); | 131 const FilePath& local_path); |
132 | 132 |
133 // 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // a raw pointer. | 186 // a raw pointer. |
187 GDataFileSystemInterface* file_system_; | 187 GDataFileSystemInterface* file_system_; |
188 | 188 |
189 // Profile associated with the file system proxy. | 189 // Profile associated with the file system proxy. |
190 Profile* profile_; // Not owned. | 190 Profile* profile_; // Not owned. |
191 }; | 191 }; |
192 | 192 |
193 } // namespace chromeos | 193 } // namespace chromeos |
194 | 194 |
195 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 195 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
OLD | NEW |