Index: chrome/browser/chromeos/file_system_provider/operations/unmount.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/unmount.cc b/chrome/browser/chromeos/file_system_provider/operations/unmount.cc |
index c40f969c845d575dae30aa7d9962ab15c21967e9..edaa5e81d622cdf4965d711984908344d4fec139 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/unmount.cc |
+++ b/chrome/browser/chromeos/file_system_provider/operations/unmount.cc |
@@ -11,41 +11,50 @@ namespace chromeos { |
namespace file_system_provider { |
namespace operations { |
-Unmount::Unmount(extensions::EventRouter* event_router, |
- const ProvidedFileSystemInfo& file_system_info, |
- const storage::AsyncFileUtil::StatusCallback& callback) |
- : Operation(event_router, file_system_info), callback_(callback) { |
+template <class DestinationPolicy> |
+Unmount<DestinationPolicy>::Unmount( |
+ typename DestinationPolicy::EventRouterType* event_router, |
+ const ProvidedFileSystemInfo& file_system_info, |
+ const storage::AsyncFileUtil::StatusCallback& callback) |
+ : Operation<DestinationPolicy>(event_router, file_system_info), |
+ callback_(callback) { |
} |
-Unmount::~Unmount() { |
+template <class DestinationPolicy> |
+Unmount<DestinationPolicy>::~Unmount() { |
} |
-bool Unmount::Execute(int request_id) { |
+template <class DestinationPolicy> |
+bool Unmount<DestinationPolicy>::Execute(int request_id) { |
using extensions::api::file_system_provider::UnmountRequestedOptions; |
UnmountRequestedOptions 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; |
- return SendEvent( |
+ return this->SendEvent( |
request_id, |
extensions::api::file_system_provider::OnUnmountRequested::kEventName, |
extensions::api::file_system_provider::OnUnmountRequested::Create( |
options)); |
} |
-void Unmount::OnSuccess(int /* request_id */, |
- scoped_ptr<RequestValue> /* result */, |
- bool /* has_more */) { |
+template <class DestinationPolicy> |
+void Unmount<DestinationPolicy>::OnSuccess(int /* request_id */, |
+ scoped_ptr<RequestValue> /* result */, |
+ bool /* has_more */) { |
callback_.Run(base::File::FILE_OK); |
} |
-void Unmount::OnError(int /* request_id */, |
- scoped_ptr<RequestValue> /* result */, |
- base::File::Error error) { |
+template <class DestinationPolicy> |
+void Unmount<DestinationPolicy>::OnError(int /* request_id */, |
+ scoped_ptr<RequestValue> /* result */, |
+ base::File::Error error) { |
callback_.Run(error); |
} |
+FOR_EACH_DESTINATION_SPECIALIZE(Unmount) |
+ |
} // namespace operations |
} // namespace file_system_provider |
} // namespace chromeos |