Index: chrome/browser/chromeos/file_system_provider/operations/move_entry.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/move_entry.cc b/chrome/browser/chromeos/file_system_provider/operations/move_entry.cc |
index a41cc2cf2df1ae1b20016bccce00a6510b0d1de6..7216082c5d327bee44e06444a132899a2a5f4a43 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/move_entry.cc |
+++ b/chrome/browser/chromeos/file_system_provider/operations/move_entry.cc |
@@ -12,52 +12,60 @@ |
namespace chromeos { |
namespace file_system_provider { |
namespace operations { |
- |
-MoveEntry::MoveEntry(extensions::EventRouter* event_router, |
- const ProvidedFileSystemInfo& file_system_info, |
- const base::FilePath& source_path, |
- const base::FilePath& target_path, |
- const storage::AsyncFileUtil::StatusCallback& callback) |
- : Operation(event_router, file_system_info), |
+template <int source> |
+MoveEntry<source>::MoveEntry( |
+ typename Operation<source>::EventRouterType* event_router, |
+ const ProvidedFileSystemInfo& file_system_info, |
+ const base::FilePath& source_path, |
+ const base::FilePath& target_path, |
+ const storage::AsyncFileUtil::StatusCallback& callback) |
+ : Operation<source>(event_router, file_system_info), |
source_path_(source_path), |
target_path_(target_path), |
callback_(callback) { |
} |
-MoveEntry::~MoveEntry() { |
+template <int source> |
+MoveEntry<source>::~MoveEntry() { |
} |
-bool MoveEntry::Execute(int request_id) { |
+template <int source> |
+bool MoveEntry<source>::Execute(int request_id) { |
using extensions::api::file_system_provider::MoveEntryRequestedOptions; |
- if (!file_system_info_.writable()) |
+ if (!this->file_system_info_.writable()) |
return false; |
MoveEntryRequestedOptions 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.source_path = source_path_.AsUTF8Unsafe(); |
options.target_path = target_path_.AsUTF8Unsafe(); |
- return SendEvent( |
+ return this->SendEvent( |
request_id, |
extensions::api::file_system_provider::OnMoveEntryRequested::kEventName, |
extensions::api::file_system_provider::OnMoveEntryRequested::Create( |
options)); |
} |
-void MoveEntry::OnSuccess(int /* request_id */, |
- scoped_ptr<RequestValue> /* result */, |
- bool has_more) { |
+template <int source> |
+void MoveEntry<source>::OnSuccess(int /* request_id */, |
+ scoped_ptr<RequestValue> /* result */, |
+ bool has_more) { |
callback_.Run(base::File::FILE_OK); |
} |
-void MoveEntry::OnError(int /* request_id */, |
- scoped_ptr<RequestValue> /* result */, |
- base::File::Error error) { |
+template <int source> |
+void MoveEntry<source>::OnError(int /* request_id */, |
+ scoped_ptr<RequestValue> /* result */, |
+ base::File::Error error) { |
callback_.Run(error); |
} |
+template class MoveEntry<Source_Type::extension>; |
+template class MoveEntry<Source_Type::plugin>; |
+ |
} // namespace operations |
} // namespace file_system_provider |
} // namespace chromeos |