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..13c046cfd954f265990424d57911307de787366f 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,54 @@ |
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 <int source> |
+CloseFile<source>::CloseFile( |
+ typename Operation<source>::EventRouterType* event_router, |
+ const ProvidedFileSystemInfo& file_system_info, |
+ int open_request_id, |
+ const storage::AsyncFileUtil::StatusCallback& callback) |
+ : Operation<source>(event_router, file_system_info), |
open_request_id_(open_request_id), |
callback_(callback) { |
} |
-CloseFile::~CloseFile() { |
+template <int source> |
+CloseFile<source>::~CloseFile() { |
} |
-bool CloseFile::Execute(int request_id) { |
+template <int source> |
+bool CloseFile<source>::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 <int source> |
+void CloseFile<source>::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 <int source> |
+void CloseFile<source>::OnError(int /* request_id */, |
+ scoped_ptr<RequestValue> /* result */, |
+ base::File::Error error) { |
callback_.Run(error); |
} |
+template class CloseFile<Source_Type::extension>; |
+template class CloseFile<Source_Type::plugin>; |
+ |
} // namespace operations |
} // namespace file_system_provider |
} // namespace chromeos |