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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 bool | 142 bool |
143 FileSystemProviderInternalReadDirectoryRequestedErrorFunction::RunWhenValid() { | 143 FileSystemProviderInternalReadDirectoryRequestedErrorFunction::RunWhenValid() { |
144 using api::file_system_provider_internal::ReadDirectoryRequestedError::Params; | 144 using api::file_system_provider_internal::ReadDirectoryRequestedError::Params; |
145 const scoped_ptr<Params> params(Params::Create(*args_)); | 145 const scoped_ptr<Params> params(Params::Create(*args_)); |
146 EXTENSION_FUNCTION_VALIDATE(params); | 146 EXTENSION_FUNCTION_VALIDATE(params); |
147 | 147 |
148 RejectRequest(ProviderErrorToFileError(params->error)); | 148 RejectRequest(ProviderErrorToFileError(params->error)); |
149 return true; | 149 return true; |
150 } | 150 } |
151 | 151 |
| 152 bool |
| 153 FileSystemProviderInternalOpenFileRequestedSuccessFunction::RunWhenValid() { |
| 154 using api::file_system_provider_internal::OpenFileRequestedSuccess::Params; |
| 155 scoped_ptr<Params> params(Params::Create(*args_)); |
| 156 EXTENSION_FUNCTION_VALIDATE(params); |
| 157 |
| 158 FulfillRequest(scoped_ptr<RequestValue>(new RequestValue()), |
| 159 false /* has_more */); |
| 160 return true; |
| 161 } |
| 162 |
| 163 bool FileSystemProviderInternalOpenFileRequestedErrorFunction::RunWhenValid() { |
| 164 using api::file_system_provider_internal::OpenFileRequestedError::Params; |
| 165 const scoped_ptr<Params> params(Params::Create(*args_)); |
| 166 EXTENSION_FUNCTION_VALIDATE(params); |
| 167 |
| 168 RejectRequest(ProviderErrorToFileError(params->error)); |
| 169 return true; |
| 170 } |
| 171 |
152 } // namespace extensions | 172 } // namespace extensions |
OLD | NEW |