Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / request_value.cc
blobf69781dc52ae81eab11c2179fcb9dfbed1cb650d
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"
7 namespace chromeos {
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();
21 return result.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();
29 return result.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();
37 return result.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();
45 return result.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();
53 return result.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();
61 return result.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();
69 return result.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));
76 return result.Pass();
79 } // namespace file_system_provider
80 } // namespace chromeos