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

Side by Side Diff: chrome/browser/chromeos/drive/file_system.h

Issue 371883003: Files.app: Add an private API to get a download URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_DRIVE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const FileOperationCallback& completion_callback) OVERRIDE; 134 const FileOperationCallback& completion_callback) OVERRIDE;
135 virtual void GetResourceEntry( 135 virtual void GetResourceEntry(
136 const base::FilePath& file_path, 136 const base::FilePath& file_path,
137 const GetResourceEntryCallback& callback) OVERRIDE; 137 const GetResourceEntryCallback& callback) OVERRIDE;
138 virtual void ReadDirectory( 138 virtual void ReadDirectory(
139 const base::FilePath& directory_path, 139 const base::FilePath& directory_path,
140 const ReadDirectoryEntriesCallback& entries_callback, 140 const ReadDirectoryEntriesCallback& entries_callback,
141 const FileOperationCallback& completion_callback) OVERRIDE; 141 const FileOperationCallback& completion_callback) OVERRIDE;
142 virtual void GetAvailableSpace( 142 virtual void GetAvailableSpace(
143 const GetAvailableSpaceCallback& callback) OVERRIDE; 143 const GetAvailableSpaceCallback& callback) OVERRIDE;
144 virtual void GetShareUrl( 144 virtual void GetShareUrl(const base::FilePath& file_path,
145 const base::FilePath& file_path, 145 const GURL& embed_origin,
146 const GURL& embed_origin, 146 const GetUrlCallback& callback) OVERRIDE;
147 const GetShareUrlCallback& callback) OVERRIDE; 147 virtual void GetDownloadUrl(const base::FilePath& file_path,
148 const GetUrlCallback& callback) OVERRIDE;
148 virtual void GetMetadata( 149 virtual void GetMetadata(
149 const GetFilesystemMetadataCallback& callback) OVERRIDE; 150 const GetFilesystemMetadataCallback& callback) OVERRIDE;
150 virtual void MarkCacheFileAsMounted( 151 virtual void MarkCacheFileAsMounted(
151 const base::FilePath& drive_file_path, 152 const base::FilePath& drive_file_path,
152 const MarkMountedCallback& callback) OVERRIDE; 153 const MarkMountedCallback& callback) OVERRIDE;
153 virtual void MarkCacheFileAsUnmounted( 154 virtual void MarkCacheFileAsUnmounted(
154 const base::FilePath& cache_file_path, 155 const base::FilePath& cache_file_path,
155 const FileOperationCallback& callback) OVERRIDE; 156 const FileOperationCallback& callback) OVERRIDE;
156 virtual void AddPermission(const base::FilePath& drive_file_path, 157 virtual void AddPermission(const base::FilePath& drive_file_path,
157 const std::string& email, 158 const std::string& email,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Part of GetResourceEntry(). 217 // Part of GetResourceEntry().
217 // Called when ReadDirectory() is complete. 218 // Called when ReadDirectory() is complete.
218 void GetResourceEntryAfterRead(const base::FilePath& file_path, 219 void GetResourceEntryAfterRead(const base::FilePath& file_path,
219 const GetResourceEntryCallback& callback, 220 const GetResourceEntryCallback& callback,
220 FileError error); 221 FileError error);
221 222
222 // Part of GetShareUrl. Resolves the resource entry to get the resource it, 223 // Part of GetShareUrl. Resolves the resource entry to get the resource it,
223 // and then uses it to ask for the share url. |callback| must not be null. 224 // and then uses it to ask for the share url. |callback| must not be null.
224 void GetShareUrlAfterGetResourceEntry(const base::FilePath& file_path, 225 void GetShareUrlAfterGetResourceEntry(const base::FilePath& file_path,
225 const GURL& embed_origin, 226 const GURL& embed_origin,
226 const GetShareUrlCallback& callback, 227 const GetUrlCallback& callback,
227 ResourceEntry* entry, 228 ResourceEntry* entry,
228 FileError error); 229 FileError error);
229 void OnGetResourceEntryForGetShareUrl(const GetShareUrlCallback& callback, 230 void OnGetResourceEntryForGetShareUrl(const GetUrlCallback& callback,
230 google_apis::GDataErrorCode status, 231 google_apis::GDataErrorCode status,
231 const GURL& share_url); 232 const GURL& share_url);
232 // Part of AddPermission. 233 // Part of AddPermission.
233 void AddPermissionAfterGetResourceEntry( 234 void AddPermissionAfterGetResourceEntry(
234 const std::string& email, 235 const std::string& email,
235 google_apis::drive::PermissionRole role, 236 google_apis::drive::PermissionRole role,
236 const FileOperationCallback& callback, 237 const FileOperationCallback& callback,
237 ResourceEntry* entry, 238 ResourceEntry* entry,
238 FileError error); 239 FileError error);
239 240
241 // Part of GetDownloadUrl. Resolves the resource entry to get the resource it,
hashimoto 2014/07/09 07:48:57 s/it/ID/?
242 // and then uses it to ask for the share url. |callback| must not be null.
243 void GetDownloadUrlAfterGetResourceEntry(const base::FilePath& file_path,
244 const GetUrlCallback& callback,
245 ResourceEntry* entry,
246 FileError error);
247 void OnGetFileResourceForGetDownloadUrl(
248 const GetUrlCallback& callback,
249 google_apis::GDataErrorCode status,
250 scoped_ptr<google_apis::FileResource> file_resource);
251
240 // Part of OnDriveSyncError(). 252 // Part of OnDriveSyncError().
241 virtual void OnDriveSyncErrorAfterGetFilePath( 253 virtual void OnDriveSyncErrorAfterGetFilePath(
242 file_system::DriveSyncErrorType type, 254 file_system::DriveSyncErrorType type,
243 const base::FilePath* file_path, 255 const base::FilePath* file_path,
244 FileError error); 256 FileError error);
245 257
246 // Used to get Drive related preferences. 258 // Used to get Drive related preferences.
247 PrefService* pref_service_; 259 PrefService* pref_service_;
248 260
249 // Sub components owned by DriveIntegrationService. 261 // Sub components owned by DriveIntegrationService.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Note: This should remain the last member so it'll be destroyed and 307 // Note: This should remain the last member so it'll be destroyed and
296 // invalidate the weak pointers before any other members are destroyed. 308 // invalidate the weak pointers before any other members are destroyed.
297 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; 309 base::WeakPtrFactory<FileSystem> weak_ptr_factory_;
298 310
299 DISALLOW_COPY_AND_ASSIGN(FileSystem); 311 DISALLOW_COPY_AND_ASSIGN(FileSystem);
300 }; 312 };
301 313
302 } // namespace drive 314 } // namespace drive
303 315
304 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ 316 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698