| Index: chrome/browser/chromeos/file_system_provider/operations/close_file.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/close_file.cc b/chrome/browser/chromeos/file_system_provider/operations/close_file.cc
|
| index 321fd9c84a2f2e4fd6467399ac77c65052bc1ceb..1867b7d5bc77f28d9d5816c8857e47466648f218 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/close_file.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/close_file.cc
|
| @@ -12,46 +12,53 @@
|
| namespace chromeos {
|
| namespace file_system_provider {
|
| namespace operations {
|
| -
|
| -CloseFile::CloseFile(extensions::EventRouter* event_router,
|
| - const ProvidedFileSystemInfo& file_system_info,
|
| - int open_request_id,
|
| - const storage::AsyncFileUtil::StatusCallback& callback)
|
| - : Operation(event_router, file_system_info),
|
| +template <class DestinationPolicy>
|
| +CloseFile<DestinationPolicy>::CloseFile(
|
| + typename DestinationPolicy::EventRouterType* event_router,
|
| + const ProvidedFileSystemInfo& file_system_info,
|
| + int open_request_id,
|
| + const storage::AsyncFileUtil::StatusCallback& callback)
|
| + : Operation<DestinationPolicy>(event_router, file_system_info),
|
| open_request_id_(open_request_id),
|
| callback_(callback) {
|
| }
|
|
|
| -CloseFile::~CloseFile() {
|
| +template <class DestinationPolicy>
|
| +CloseFile<DestinationPolicy>::~CloseFile() {
|
| }
|
|
|
| -bool CloseFile::Execute(int request_id) {
|
| +template <class DestinationPolicy>
|
| +bool CloseFile<DestinationPolicy>::Execute(int request_id) {
|
| using extensions::api::file_system_provider::CloseFileRequestedOptions;
|
|
|
| CloseFileRequestedOptions options;
|
| - options.file_system_id = file_system_info_.file_system_id();
|
| + options.file_system_id = this->file_system_info_.file_system_id();
|
| options.request_id = request_id;
|
| options.open_request_id = open_request_id_;
|
|
|
| - return SendEvent(
|
| + return this->SendEvent(
|
| request_id,
|
| extensions::api::file_system_provider::OnCloseFileRequested::kEventName,
|
| extensions::api::file_system_provider::OnCloseFileRequested::Create(
|
| options));
|
| }
|
|
|
| -void CloseFile::OnSuccess(int /* request_id */,
|
| - scoped_ptr<RequestValue> result,
|
| - bool has_more) {
|
| +template <class DestinationPolicy>
|
| +void CloseFile<DestinationPolicy>::OnSuccess(int /* request_id */,
|
| + scoped_ptr<RequestValue> result,
|
| + bool has_more) {
|
| callback_.Run(base::File::FILE_OK);
|
| }
|
|
|
| -void CloseFile::OnError(int /* request_id */,
|
| - scoped_ptr<RequestValue> /* result */,
|
| - base::File::Error error) {
|
| +template <class DestinationPolicy>
|
| +void CloseFile<DestinationPolicy>::OnError(int /* request_id */,
|
| + scoped_ptr<RequestValue> /* result */,
|
| + base::File::Error error) {
|
| callback_.Run(error);
|
| }
|
|
|
| +FOR_EACH_DESTINATION_SPECIALIZE(CloseFile)
|
| +
|
| } // namespace operations
|
| } // namespace file_system_provider
|
| } // namespace chromeos
|
|
|