| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr
ovider_api.h" | 5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr
ovider_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() { | 291 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() { |
| 292 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; | 292 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; |
| 293 scoped_ptr<Params> params(Params::Create(*args_)); | 293 scoped_ptr<Params> params(Params::Create(*args_)); |
| 294 EXTENSION_FUNCTION_VALIDATE(params); | 294 EXTENSION_FUNCTION_VALIDATE(params); |
| 295 | 295 |
| 296 return FulfillRequest( | 296 return FulfillRequest( |
| 297 RequestValue::CreateForGetMetadataSuccess(params.Pass()), | 297 RequestValue::CreateForGetMetadataSuccess(params.Pass()), |
| 298 false /* has_more */); | 298 false /* has_more */); |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool FileSystemProviderInternalGetActionsRequestedSuccessFunction:: |
| 302 RunWhenValid() { |
| 303 using api::file_system_provider_internal::GetActionsRequestedSuccess::Params; |
| 304 scoped_ptr<Params> params(Params::Create(*args_)); |
| 305 EXTENSION_FUNCTION_VALIDATE(params); |
| 306 |
| 307 return FulfillRequest(RequestValue::CreateForGetActionsSuccess(params.Pass()), |
| 308 false /* has_more */); |
| 309 } |
| 310 |
| 301 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction:: | 311 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction:: |
| 302 RunWhenValid() { | 312 RunWhenValid() { |
| 303 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess:: | 313 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess:: |
| 304 Params; | 314 Params; |
| 305 scoped_ptr<Params> params(Params::Create(*args_)); | 315 scoped_ptr<Params> params(Params::Create(*args_)); |
| 306 EXTENSION_FUNCTION_VALIDATE(params); | 316 EXTENSION_FUNCTION_VALIDATE(params); |
| 307 | 317 |
| 308 const bool has_more = params->has_more; | 318 const bool has_more = params->has_more; |
| 309 return FulfillRequest( | 319 return FulfillRequest( |
| 310 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more); | 320 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 339 using api::file_system_provider_internal::OperationRequestedError::Params; | 349 using api::file_system_provider_internal::OperationRequestedError::Params; |
| 340 scoped_ptr<Params> params(Params::Create(*args_)); | 350 scoped_ptr<Params> params(Params::Create(*args_)); |
| 341 EXTENSION_FUNCTION_VALIDATE(params); | 351 EXTENSION_FUNCTION_VALIDATE(params); |
| 342 | 352 |
| 343 const base::File::Error error = ProviderErrorToFileError(params->error); | 353 const base::File::Error error = ProviderErrorToFileError(params->error); |
| 344 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()), | 354 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()), |
| 345 error); | 355 error); |
| 346 } | 356 } |
| 347 | 357 |
| 348 } // namespace extensions | 358 } // namespace extensions |
| OLD | NEW |