| Index: chrome/browser/chromeos/file_system_provider/operations/create_directory.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_directory.cc b/chrome/browser/chromeos/file_system_provider/operations/create_directory.cc
|
| index c4508931894153f1073f22fd8724850108fab2ad..4263cfb6290a1dda9345229f26673054e05df3d8 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/create_directory.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/create_directory.cc
|
| @@ -13,53 +13,60 @@ namespace chromeos {
|
| namespace file_system_provider {
|
| namespace operations {
|
|
|
| -CreateDirectory::CreateDirectory(
|
| - extensions::EventRouter* event_router,
|
| +template <int source>
|
| +CreateDirectory<source>::CreateDirectory(
|
| + typename Operation<source>::EventRouterType* event_router,
|
| const ProvidedFileSystemInfo& file_system_info,
|
| const base::FilePath& directory_path,
|
| bool recursive,
|
| const storage::AsyncFileUtil::StatusCallback& callback)
|
| - : Operation(event_router, file_system_info),
|
| + : Operation<source>(event_router, file_system_info),
|
| directory_path_(directory_path),
|
| recursive_(recursive),
|
| callback_(callback) {
|
| }
|
|
|
| -CreateDirectory::~CreateDirectory() {
|
| +template <int source>
|
| +CreateDirectory<source>::~CreateDirectory() {
|
| }
|
|
|
| -bool CreateDirectory::Execute(int request_id) {
|
| +template <int source>
|
| +bool CreateDirectory<source>::Execute(int request_id) {
|
| using extensions::api::file_system_provider::CreateDirectoryRequestedOptions;
|
|
|
| - if (!file_system_info_.writable())
|
| + if (!this->file_system_info_.writable())
|
| return false;
|
|
|
| CreateDirectoryRequestedOptions 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.directory_path = directory_path_.AsUTF8Unsafe();
|
| options.recursive = recursive_;
|
|
|
| - return SendEvent(
|
| - request_id,
|
| - extensions::api::file_system_provider::OnCreateDirectoryRequested::
|
| - kEventName,
|
| + return this->SendEvent(
|
| + request_id, extensions::api::file_system_provider::
|
| + OnCreateDirectoryRequested::kEventName,
|
| extensions::api::file_system_provider::OnCreateDirectoryRequested::Create(
|
| options));
|
| }
|
|
|
| -void CreateDirectory::OnSuccess(int /* request_id */,
|
| - scoped_ptr<RequestValue> /* result */,
|
| - bool has_more) {
|
| +template <int source>
|
| +void CreateDirectory<source>::OnSuccess(int /* request_id */,
|
| + scoped_ptr<RequestValue> /* result */,
|
| + bool has_more) {
|
| callback_.Run(base::File::FILE_OK);
|
| }
|
|
|
| -void CreateDirectory::OnError(int /* request_id */,
|
| - scoped_ptr<RequestValue> /* result */,
|
| - base::File::Error error) {
|
| +template <int source>
|
| +void CreateDirectory<source>::OnError(int /* request_id */,
|
| + scoped_ptr<RequestValue> /* result */,
|
| + base::File::Error error) {
|
| callback_.Run(error);
|
| }
|
|
|
| +template class CreateDirectory<Source_Type::extension>;
|
| +template class CreateDirectory<Source_Type::plugin>;
|
| +
|
| } // namespace operations
|
| } // namespace file_system_provider
|
| } // namespace chromeos
|
|
|