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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_interface.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_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const base::FilePath& file_path, 105 const base::FilePath& file_path,
106 const base::Closure& close_callback)> 106 const base::Closure& close_callback)>
107 OpenFileCallback; 107 OpenFileCallback;
108 108
109 // Used to get available space for the account from Drive. 109 // Used to get available space for the account from Drive.
110 typedef base::Callback<void(FileError error, 110 typedef base::Callback<void(FileError error,
111 int64 bytes_total, 111 int64 bytes_total,
112 int64 bytes_used)> GetAvailableSpaceCallback; 112 int64 bytes_used)> GetAvailableSpaceCallback;
113 113
114 // Used to get the url to the sharing dialog. 114 // Used to get the url to the sharing dialog.
115 typedef base::Callback<void(FileError error, 115 typedef base::Callback<void(FileError error, const GURL& share_url)>
116 const GURL& share_url)> GetShareUrlCallback; 116 GetUrlCallback;
117 117
118 // Used to get filesystem metadata. 118 // Used to get filesystem metadata.
119 typedef base::Callback<void(const FileSystemMetadata&)> 119 typedef base::Callback<void(const FileSystemMetadata&)>
120 GetFilesystemMetadataCallback; 120 GetFilesystemMetadataCallback;
121 121
122 // Used to mark cached files mounted. 122 // Used to mark cached files mounted.
123 typedef base::Callback<void(FileError error, 123 typedef base::Callback<void(FileError error,
124 const base::FilePath& file_path)> 124 const base::FilePath& file_path)>
125 MarkMountedCallback; 125 MarkMountedCallback;
126 126
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 int options, 380 int options,
381 int at_most_num_matches, 381 int at_most_num_matches,
382 const SearchMetadataCallback& callback) = 0; 382 const SearchMetadataCallback& callback) = 0;
383 383
384 // Fetches the user's Account Metadata to find out current quota information 384 // Fetches the user's Account Metadata to find out current quota information
385 // and returns it to the callback. 385 // and returns it to the callback.
386 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0; 386 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0;
387 387
388 // Fetches the url to the sharing dialog to be embedded in |embed_origin|, 388 // Fetches the url to the sharing dialog to be embedded in |embed_origin|,
389 // for the specified file or directory. |callback| must not be null. 389 // for the specified file or directory. |callback| must not be null.
390 virtual void GetShareUrl( 390 virtual void GetShareUrl(const base::FilePath& file_path,
391 const base::FilePath& file_path, 391 const GURL& embed_origin,
392 const GURL& embed_origin, 392 const GetUrlCallback& callback) = 0;
393 const GetShareUrlCallback& callback) = 0; 393
394 // Fetches the url to download the file directry. |callback| must not be null.
hashimoto 2014/07/09 07:48:57 nit: s/directry/directly/?
395 virtual void GetDownloadUrl(const base::FilePath& file_path,
396 const GetUrlCallback& callback) = 0;
394 397
395 // Returns miscellaneous metadata of the file system like the largest 398 // Returns miscellaneous metadata of the file system like the largest
396 // timestamp. Used in chrome:drive-internals. |callback| must not be null. 399 // timestamp. Used in chrome:drive-internals. |callback| must not be null.
397 virtual void GetMetadata( 400 virtual void GetMetadata(
398 const GetFilesystemMetadataCallback& callback) = 0; 401 const GetFilesystemMetadataCallback& callback) = 0;
399 402
400 // Marks the cached file as mounted, and runs |callback| upon completion. 403 // Marks the cached file as mounted, and runs |callback| upon completion.
401 // If succeeded, the cached file path will be passed to the |callback|. 404 // If succeeded, the cached file path will be passed to the |callback|.
402 // |callback| must not be null. 405 // |callback| must not be null.
403 virtual void MarkCacheFileAsMounted(const base::FilePath& drive_file_path, 406 virtual void MarkCacheFileAsMounted(const base::FilePath& drive_file_path,
(...skipping 18 matching lines...) Expand all
422 virtual void Reset(const FileOperationCallback& callback) = 0; 425 virtual void Reset(const FileOperationCallback& callback) = 0;
423 426
424 // Finds a path of an entry (a file or a directory) by |resource_id|. 427 // Finds a path of an entry (a file or a directory) by |resource_id|.
425 virtual void GetPathFromResourceId(const std::string& resource_id, 428 virtual void GetPathFromResourceId(const std::string& resource_id,
426 const GetFilePathCallback& callback) = 0; 429 const GetFilePathCallback& callback) = 0;
427 }; 430 };
428 431
429 } // namespace drive 432 } // namespace drive
430 433
431 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ 434 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698