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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 bool FileSystemProviderInternalCloseFileRequestedErrorFunction::RunWhenValid() { | 183 bool FileSystemProviderInternalCloseFileRequestedErrorFunction::RunWhenValid() { |
184 using api::file_system_provider_internal::CloseFileRequestedError::Params; | 184 using api::file_system_provider_internal::CloseFileRequestedError::Params; |
185 const scoped_ptr<Params> params(Params::Create(*args_)); | 185 const scoped_ptr<Params> params(Params::Create(*args_)); |
186 EXTENSION_FUNCTION_VALIDATE(params); | 186 EXTENSION_FUNCTION_VALIDATE(params); |
187 | 187 |
188 RejectRequest(ProviderErrorToFileError(params->error)); | 188 RejectRequest(ProviderErrorToFileError(params->error)); |
189 return true; | 189 return true; |
190 } | 190 } |
191 | 191 |
| 192 bool |
| 193 FileSystemProviderInternalReadFileRequestedSuccessFunction::RunWhenValid() { |
| 194 using api::file_system_provider_internal::ReadFileRequestedSuccess::Params; |
| 195 scoped_ptr<Params> params(Params::Create(*args_)); |
| 196 EXTENSION_FUNCTION_VALIDATE(params); |
| 197 |
| 198 const bool has_next = params->has_next; |
| 199 FulfillRequest(RequestValue::CreateForReadFileSuccess(params.Pass()), |
| 200 has_next); |
| 201 return true; |
| 202 } |
| 203 |
| 204 bool FileSystemProviderInternalReadFileRequestedErrorFunction::RunWhenValid() { |
| 205 using api::file_system_provider_internal::ReadFileRequestedError::Params; |
| 206 const scoped_ptr<Params> params(Params::Create(*args_)); |
| 207 EXTENSION_FUNCTION_VALIDATE(params); |
| 208 |
| 209 RejectRequest(ProviderErrorToFileError(params->error)); |
| 210 return true; |
| 211 } |
| 212 |
192 } // namespace extensions | 213 } // namespace extensions |
OLD | NEW |