Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/file_manager/private_api_drive.h |
| diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h |
| index b3eec926c2a7c2011d899ef9258ba03524c55a57..61394403dc0855a6d2dbcf7d8a3b1ff2dbed24a0 100644 |
| --- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h |
| +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h |
| @@ -240,6 +240,32 @@ class FileBrowserPrivateRequestDriveShareFunction |
| void OnAddPermission(drive::FileError error); |
| }; |
| +// Implements the chrome.fileBrowserPrivate.getShareUrl method. |
|
hashimoto
2014/07/09 07:48:57
s/getShareUrl/getDownloadUrl/
yoshiki
2014/07/11 13:48:50
Done.
|
| +class FileBrowserPrivateGetDownloadUrlFunction |
| + : public LoggedAsyncExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDownloadUrl", |
| + FILEBROWSERPRIVATE_GETSHAREURL) |
| + |
| + protected: |
| + virtual ~FileBrowserPrivateGetDownloadUrlFunction() {} |
| + |
| + // AsyncExtensionFunction overrides. |
| + virtual bool RunAsync() OVERRIDE; |
| + |
| + // Callback with an |download_url|, called by FileSystem::GetDownloadUrl. |
| + void OnGetDownloadUrl(drive::FileError error, const GURL& download_url); |
| + |
| + // Callback with an |access_token|, called by |
| + // drive::DriveReadonlyTokenFetcher. |
| + void OnTokenFetched(google_apis::GDataErrorCode code, |
| + const std::string& access_token); |
| + |
| + private: |
| + std::string download_url_; |
| + base::FilePath file_path_; |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ |