1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_system_provider/request_value.h"
8 namespace file_system_provider
{
10 RequestValue::RequestValue() {
13 RequestValue::~RequestValue() {
16 scoped_ptr
<RequestValue
> RequestValue::CreateForUnmountSuccess(
17 scoped_ptr
<extensions::api::file_system_provider_internal::
18 UnmountRequestedSuccess::Params
> params
) {
19 scoped_ptr
<RequestValue
> result(new RequestValue
);
20 result
->unmount_success_params_
= params
.Pass();
24 scoped_ptr
<RequestValue
> RequestValue::CreateForGetMetadataSuccess(
25 scoped_ptr
<extensions::api::file_system_provider_internal::
26 GetMetadataRequestedSuccess::Params
> params
) {
27 scoped_ptr
<RequestValue
> result(new RequestValue
);
28 result
->get_metadata_success_params_
= params
.Pass();
32 scoped_ptr
<RequestValue
> RequestValue::CreateForGetActionsSuccess(
33 scoped_ptr
<extensions::api::file_system_provider_internal::
34 GetActionsRequestedSuccess::Params
> params
) {
35 scoped_ptr
<RequestValue
> result(new RequestValue
);
36 result
->get_actions_success_params_
= params
.Pass();
40 scoped_ptr
<RequestValue
> RequestValue::CreateForReadDirectorySuccess(
41 scoped_ptr
<extensions::api::file_system_provider_internal::
42 ReadDirectoryRequestedSuccess::Params
> params
) {
43 scoped_ptr
<RequestValue
> result(new RequestValue
);
44 result
->read_directory_success_params_
= params
.Pass();
48 scoped_ptr
<RequestValue
> RequestValue::CreateForReadFileSuccess(
49 scoped_ptr
<extensions::api::file_system_provider_internal::
50 ReadFileRequestedSuccess::Params
> params
) {
51 scoped_ptr
<RequestValue
> result(new RequestValue
);
52 result
->read_file_success_params_
= params
.Pass();
56 scoped_ptr
<RequestValue
> RequestValue::CreateForOperationSuccess(
57 scoped_ptr
<extensions::api::file_system_provider_internal::
58 OperationRequestedSuccess::Params
> params
) {
59 scoped_ptr
<RequestValue
> result(new RequestValue
);
60 result
->operation_success_params_
= params
.Pass();
64 scoped_ptr
<RequestValue
> RequestValue::CreateForOperationError(
65 scoped_ptr
<extensions::api::file_system_provider_internal::
66 OperationRequestedError::Params
> params
) {
67 scoped_ptr
<RequestValue
> result(new RequestValue
);
68 result
->operation_error_params_
= params
.Pass();
72 scoped_ptr
<RequestValue
> RequestValue::CreateForTesting(
73 const std::string
& params
) {
74 scoped_ptr
<RequestValue
> result(new RequestValue
);
75 result
->testing_params_
.reset(new std::string(params
));
79 } // namespace file_system_provider
80 } // namespace chromeos