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 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" | 10 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 result->Append(CreateError(kSecurityErrorName, kUnmountFailedErrorMessage)); | 78 result->Append(CreateError(kSecurityErrorName, kUnmountFailedErrorMessage)); |
79 SetResult(result); | 79 SetResult(result); |
80 return true; | 80 return true; |
81 } | 81 } |
82 | 82 |
83 base::ListValue* result = new base::ListValue(); | 83 base::ListValue* result = new base::ListValue(); |
84 SetResult(result); | 84 SetResult(result); |
85 return true; | 85 return true; |
86 } | 86 } |
87 | 87 |
88 bool FileSystemProviderInternalUnmountRequestedSuccessFunction::RunSync() { | 88 bool FileSystemProviderInternalUnmountRequestedSuccessFunction::RunWhenValid() { |
89 using api::file_system_provider_internal::UnmountRequestedSuccess::Params; | 89 using api::file_system_provider_internal::UnmountRequestedSuccess::Params; |
90 scoped_ptr<Params> params(Params::Create(*args_)); | 90 scoped_ptr<Params> params(Params::Create(*args_)); |
91 EXTENSION_FUNCTION_VALIDATE(params); | 91 EXTENSION_FUNCTION_VALIDATE(params); |
92 | 92 |
93 FulfillRequest(RequestValue::CreateForUnmountSuccess(params.Pass()), | 93 FulfillRequest(RequestValue::CreateForUnmountSuccess(params.Pass()), |
94 false /* has_more */); | 94 false /* has_more */); |
95 return true; | 95 return true; |
96 } | 96 } |
97 | 97 |
98 bool FileSystemProviderInternalUnmountRequestedErrorFunction::RunSync() { | 98 bool FileSystemProviderInternalUnmountRequestedErrorFunction::RunWhenValid() { |
99 using api::file_system_provider_internal::UnmountRequestedError::Params; | 99 using api::file_system_provider_internal::UnmountRequestedError::Params; |
100 const scoped_ptr<Params> params(Params::Create(*args_)); | 100 const scoped_ptr<Params> params(Params::Create(*args_)); |
101 EXTENSION_FUNCTION_VALIDATE(params); | 101 EXTENSION_FUNCTION_VALIDATE(params); |
102 | 102 |
103 RejectRequest(ProviderErrorToFileError(params->error)); | 103 RejectRequest(ProviderErrorToFileError(params->error)); |
104 return true; | 104 return true; |
105 } | 105 } |
106 | 106 |
107 bool FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunSync() { | 107 bool |
| 108 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() { |
108 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; | 109 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; |
109 scoped_ptr<Params> params(Params::Create(*args_)); | 110 scoped_ptr<Params> params(Params::Create(*args_)); |
110 EXTENSION_FUNCTION_VALIDATE(params); | 111 EXTENSION_FUNCTION_VALIDATE(params); |
111 | 112 |
112 FulfillRequest(RequestValue::CreateForGetMetadataSuccess(params.Pass()), | 113 FulfillRequest(RequestValue::CreateForGetMetadataSuccess(params.Pass()), |
113 false /* has_more */); | 114 false /* has_more */); |
114 return true; | 115 return true; |
115 } | 116 } |
116 | 117 |
117 bool FileSystemProviderInternalGetMetadataRequestedErrorFunction::RunSync() { | 118 bool |
| 119 FileSystemProviderInternalGetMetadataRequestedErrorFunction::RunWhenValid() { |
118 using api::file_system_provider_internal::GetMetadataRequestedError::Params; | 120 using api::file_system_provider_internal::GetMetadataRequestedError::Params; |
119 const scoped_ptr<Params> params(Params::Create(*args_)); | 121 const scoped_ptr<Params> params(Params::Create(*args_)); |
120 EXTENSION_FUNCTION_VALIDATE(params); | 122 EXTENSION_FUNCTION_VALIDATE(params); |
121 | 123 |
122 RejectRequest(ProviderErrorToFileError(params->error)); | 124 RejectRequest(ProviderErrorToFileError(params->error)); |
123 return true; | 125 return true; |
124 } | 126 } |
125 | 127 |
126 } // namespace extensions | 128 } // namespace extensions |
OLD | NEW |