| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 6 | 6 |
| 7 #include "base/platform_file.h" | 7 #include "base/platform_file.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "net/base/escape.h" | 11 #include "net/base/escape.h" |
| 12 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
| 13 #include "ppapi/shared_impl/file_type_conversion.h" | 13 #include "ppapi/shared_impl/file_type_conversion.h" |
| 14 #include "ppapi/shared_impl/time_conversion.h" | 14 #include "ppapi/shared_impl/time_conversion.h" |
| 15 #include "ppapi/shared_impl/var.h" | 15 #include "ppapi/shared_impl/var.h" |
| 16 #include "ppapi/thunk/enter.h" | 16 #include "ppapi/thunk/enter.h" |
| 17 #include "ppapi/thunk/ppb_file_system_api.h" | 17 #include "ppapi/thunk/ppb_file_system_api.h" |
| 18 #include "webkit/plugins/ppapi/common.h" | 18 #include "webkit/plugins/ppapi/common.h" |
| 19 #include "webkit/plugins/ppapi/file_callbacks.h" | 19 #include "webkit/plugins/ppapi/file_callbacks.h" |
| 20 #include "webkit/plugins/ppapi/plugin_delegate.h" | 20 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 21 #include "webkit/plugins/ppapi/plugin_module.h" | 21 #include "webkit/plugins/ppapi/plugin_module.h" |
| 22 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 22 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 23 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | |
| 24 #include "webkit/plugins/ppapi/resource_helper.h" | 23 #include "webkit/plugins/ppapi/resource_helper.h" |
| 25 | 24 |
| 26 using ppapi::HostResource; | 25 using ppapi::HostResource; |
| 27 using ppapi::PPB_FileRef_CreateInfo; | 26 using ppapi::PPB_FileRef_CreateInfo; |
| 28 using ppapi::PPTimeToTime; | 27 using ppapi::PPTimeToTime; |
| 29 using ppapi::StringVar; | 28 using ppapi::StringVar; |
| 30 using ppapi::TrackedCallback; | 29 using ppapi::TrackedCallback; |
| 31 using ppapi::thunk::EnterResourceNoLock; | 30 using ppapi::thunk::EnterResourceNoLock; |
| 32 using ppapi::thunk::PPB_FileRef_API; | 31 using ppapi::thunk::PPB_FileRef_API; |
| 33 using ppapi::thunk::PPB_FileSystem_API; | 32 using ppapi::thunk::PPB_FileSystem_API; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 callback))) { | 141 callback))) { |
| 143 base::FileUtilProxy::Close( | 142 base::FileUtilProxy::Close( |
| 144 task_runner, file, base::Bind(&IgnoreCloseCallback)); | 143 task_runner, file, base::Bind(&IgnoreCloseCallback)); |
| 145 callback->Run(PP_ERROR_FAILED); | 144 callback->Run(PP_ERROR_FAILED); |
| 146 } | 145 } |
| 147 } | 146 } |
| 148 | 147 |
| 149 } // namespace | 148 } // namespace |
| 150 | 149 |
| 151 PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, | 150 PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, |
| 152 PPB_FileSystem_Impl* file_system) | 151 PP_Resource file_system) |
| 153 : PPB_FileRef_Shared(::ppapi::OBJECT_IS_IMPL, info), | 152 : PPB_FileRef_Shared(::ppapi::OBJECT_IS_IMPL, info), |
| 154 file_system_(file_system), | 153 file_system_(file_system), |
| 155 external_file_system_path_() { | 154 external_file_system_path_() { |
| 156 } | 155 } |
| 157 | 156 |
| 158 PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, | 157 PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, |
| 159 const base::FilePath& external_file_path) | 158 const base::FilePath& external_file_path) |
| 160 : PPB_FileRef_Shared(::ppapi::OBJECT_IS_IMPL, info), | 159 : PPB_FileRef_Shared(::ppapi::OBJECT_IS_IMPL, info), |
| 161 file_system_(), | 160 file_system_(), |
| 162 external_file_system_path_(external_file_path) { | 161 external_file_system_path_(external_file_path) { |
| 163 } | 162 } |
| 164 | 163 |
| 165 PPB_FileRef_Impl::~PPB_FileRef_Impl() { | 164 PPB_FileRef_Impl::~PPB_FileRef_Impl() { |
| 166 } | 165 } |
| 167 | 166 |
| 168 // static | 167 // static |
| 169 PPB_FileRef_Impl* PPB_FileRef_Impl::CreateInternal(PP_Resource pp_file_system, | 168 PPB_FileRef_Impl* PPB_FileRef_Impl::CreateInternal(PP_Instance instance, |
| 169 PP_Resource pp_file_system, |
| 170 const std::string& path) { | 170 const std::string& path) { |
| 171 EnterResourceNoLock<PPB_FileSystem_API> enter(pp_file_system, true); | 171 PluginInstance* plugin_instance = |
| 172 if (enter.failed()) | 172 ResourceHelper::PPInstanceToPluginInstance(instance); |
| 173 if (!plugin_instance || !plugin_instance->delegate()) |
| 173 return 0; | 174 return 0; |
| 174 | 175 |
| 175 PPB_FileSystem_Impl* file_system = | 176 PP_FileSystemType type = |
| 176 static_cast<PPB_FileSystem_Impl*>(enter.object()); | 177 plugin_instance->delegate()->GetFileSystemType(instance, pp_file_system); |
| 177 if (!file_system->pp_instance()) | 178 if (type != PP_FILESYSTEMTYPE_LOCALPERSISTENT && |
| 178 return 0; | 179 type != PP_FILESYSTEMTYPE_LOCALTEMPORARY && |
| 179 | 180 type != PP_FILESYSTEMTYPE_EXTERNAL) |
| 180 if (file_system->type() != PP_FILESYSTEMTYPE_LOCALPERSISTENT && | |
| 181 file_system->type() != PP_FILESYSTEMTYPE_LOCALTEMPORARY && | |
| 182 file_system->type() != PP_FILESYSTEMTYPE_EXTERNAL) | |
| 183 return 0; | 181 return 0; |
| 184 | 182 |
| 185 PPB_FileRef_CreateInfo info; | 183 PPB_FileRef_CreateInfo info; |
| 186 info.resource = HostResource::MakeInstanceOnly(file_system->pp_instance()); | 184 info.resource = HostResource::MakeInstanceOnly(instance); |
| 187 info.file_system_type = file_system->type(); | 185 info.file_system_type = type; |
| 188 | 186 |
| 189 // Validate the path. | 187 // Validate the path. |
| 190 info.path = path; | 188 info.path = path; |
| 191 if (!IsValidLocalPath(info.path)) | 189 if (!IsValidLocalPath(info.path)) |
| 192 return 0; | 190 return 0; |
| 193 TrimTrailingSlash(&info.path); | 191 TrimTrailingSlash(&info.path); |
| 194 | 192 |
| 195 info.name = GetNameForVirtualFilePath(info.path); | 193 info.name = GetNameForVirtualFilePath(info.path); |
| 196 | 194 |
| 197 return new PPB_FileRef_Impl(info, file_system); | 195 return new PPB_FileRef_Impl(info, pp_file_system); |
| 198 } | 196 } |
| 199 | 197 |
| 200 // static | 198 // static |
| 201 PPB_FileRef_Impl* PPB_FileRef_Impl::CreateExternal( | 199 PPB_FileRef_Impl* PPB_FileRef_Impl::CreateExternal( |
| 202 PP_Instance instance, | 200 PP_Instance instance, |
| 203 const base::FilePath& external_file_path, | 201 const base::FilePath& external_file_path, |
| 204 const std::string& display_name) { | 202 const std::string& display_name) { |
| 205 PPB_FileRef_CreateInfo info; | 203 PPB_FileRef_CreateInfo info; |
| 206 info.resource = HostResource::MakeInstanceOnly(instance); | 204 info.resource = HostResource::MakeInstanceOnly(instance); |
| 207 info.file_system_type = PP_FILESYSTEMTYPE_EXTERNAL; | 205 info.file_system_type = PP_FILESYSTEMTYPE_EXTERNAL; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 222 // There should always be a leading slash at least! | 220 // There should always be a leading slash at least! |
| 223 size_t pos = virtual_path.rfind('/'); | 221 size_t pos = virtual_path.rfind('/'); |
| 224 CHECK(pos != std::string::npos); | 222 CHECK(pos != std::string::npos); |
| 225 | 223 |
| 226 // If the path is "/foo", then we want to include the slash. | 224 // If the path is "/foo", then we want to include the slash. |
| 227 if (pos == 0) | 225 if (pos == 0) |
| 228 pos++; | 226 pos++; |
| 229 std::string parent_path = virtual_path.substr(0, pos); | 227 std::string parent_path = virtual_path.substr(0, pos); |
| 230 | 228 |
| 231 scoped_refptr<PPB_FileRef_Impl> parent_ref( | 229 scoped_refptr<PPB_FileRef_Impl> parent_ref( |
| 232 CreateInternal(file_system_->pp_resource(), parent_path)); | 230 CreateInternal(pp_instance(), file_system_, parent_path)); |
| 233 if (!parent_ref.get()) | 231 if (!parent_ref.get()) |
| 234 return 0; | 232 return 0; |
| 235 return parent_ref->GetReference(); | 233 return parent_ref->GetReference(); |
| 236 } | 234 } |
| 237 | 235 |
| 238 int32_t PPB_FileRef_Impl::MakeDirectory( | 236 int32_t PPB_FileRef_Impl::MakeDirectory( |
| 239 PP_Bool make_ancestors, | 237 PP_Bool make_ancestors, |
| 240 scoped_refptr<TrackedCallback> callback) { | 238 scoped_refptr<TrackedCallback> callback) { |
| 241 if (!IsValidNonExternalFileSystem()) | 239 if (!IsValidNonExternalFileSystem()) |
| 242 return PP_ERROR_NOACCESS; | 240 return PP_ERROR_NOACCESS; |
| 243 | 241 |
| 244 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 242 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 245 if (!plugin_instance) | 243 if (!plugin_instance) |
| 246 return PP_ERROR_FAILED; | 244 return PP_ERROR_FAILED; |
| 247 if (!plugin_instance->delegate()->MakeDirectory( | 245 if (!plugin_instance->delegate()->MakeDirectory( |
| 248 GetFileSystemURL(), PP_ToBool(make_ancestors), | 246 GetFileSystemURL(), PP_ToBool(make_ancestors), |
| 249 new FileCallbacks(this, callback, NULL, NULL))) | 247 new FileCallbacks(this, callback, NULL))) |
| 250 return PP_ERROR_FAILED; | 248 return PP_ERROR_FAILED; |
| 251 return PP_OK_COMPLETIONPENDING; | 249 return PP_OK_COMPLETIONPENDING; |
| 252 } | 250 } |
| 253 | 251 |
| 254 int32_t PPB_FileRef_Impl::Touch(PP_Time last_access_time, | 252 int32_t PPB_FileRef_Impl::Touch(PP_Time last_access_time, |
| 255 PP_Time last_modified_time, | 253 PP_Time last_modified_time, |
| 256 scoped_refptr<TrackedCallback> callback) { | 254 scoped_refptr<TrackedCallback> callback) { |
| 257 if (!IsValidNonExternalFileSystem()) | 255 if (!IsValidNonExternalFileSystem()) |
| 258 return PP_ERROR_NOACCESS; | 256 return PP_ERROR_NOACCESS; |
| 259 | 257 |
| 260 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 258 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 261 if (!plugin_instance) | 259 if (!plugin_instance) |
| 262 return PP_ERROR_FAILED; | 260 return PP_ERROR_FAILED; |
| 263 if (!plugin_instance->delegate()->Touch( | 261 if (!plugin_instance->delegate()->Touch( |
| 264 GetFileSystemURL(), | 262 GetFileSystemURL(), |
| 265 PPTimeToTime(last_access_time), | 263 PPTimeToTime(last_access_time), |
| 266 PPTimeToTime(last_modified_time), | 264 PPTimeToTime(last_modified_time), |
| 267 new FileCallbacks(this, callback, NULL, NULL))) | 265 new FileCallbacks(this, callback, NULL))) |
| 268 return PP_ERROR_FAILED; | 266 return PP_ERROR_FAILED; |
| 269 return PP_OK_COMPLETIONPENDING; | 267 return PP_OK_COMPLETIONPENDING; |
| 270 } | 268 } |
| 271 | 269 |
| 272 int32_t PPB_FileRef_Impl::Delete(scoped_refptr<TrackedCallback> callback) { | 270 int32_t PPB_FileRef_Impl::Delete(scoped_refptr<TrackedCallback> callback) { |
| 273 if (!IsValidNonExternalFileSystem()) | 271 if (!IsValidNonExternalFileSystem()) |
| 274 return PP_ERROR_NOACCESS; | 272 return PP_ERROR_NOACCESS; |
| 275 | 273 |
| 276 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 274 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 277 if (!plugin_instance) | 275 if (!plugin_instance) |
| 278 return PP_ERROR_FAILED; | 276 return PP_ERROR_FAILED; |
| 279 if (!plugin_instance->delegate()->Delete( | 277 if (!plugin_instance->delegate()->Delete( |
| 280 GetFileSystemURL(), | 278 GetFileSystemURL(), |
| 281 new FileCallbacks(this, callback, NULL, NULL))) | 279 new FileCallbacks(this, callback, NULL))) |
| 282 return PP_ERROR_FAILED; | 280 return PP_ERROR_FAILED; |
| 283 return PP_OK_COMPLETIONPENDING; | 281 return PP_OK_COMPLETIONPENDING; |
| 284 } | 282 } |
| 285 | 283 |
| 286 int32_t PPB_FileRef_Impl::Rename(PP_Resource new_pp_file_ref, | 284 int32_t PPB_FileRef_Impl::Rename(PP_Resource new_pp_file_ref, |
| 287 scoped_refptr<TrackedCallback> callback) { | 285 scoped_refptr<TrackedCallback> callback) { |
| 288 EnterResourceNoLock<PPB_FileRef_API> enter(new_pp_file_ref, true); | 286 EnterResourceNoLock<PPB_FileRef_API> enter(new_pp_file_ref, true); |
| 289 if (enter.failed()) | 287 if (enter.failed()) |
| 290 return PP_ERROR_BADRESOURCE; | 288 return PP_ERROR_BADRESOURCE; |
| 291 PPB_FileRef_Impl* new_file_ref = | 289 PPB_FileRef_Impl* new_file_ref = |
| 292 static_cast<PPB_FileRef_Impl*>(enter.object()); | 290 static_cast<PPB_FileRef_Impl*>(enter.object()); |
| 293 | 291 |
| 294 if (!IsValidNonExternalFileSystem() || | 292 if (!IsValidNonExternalFileSystem() || |
| 295 file_system_.get() != new_file_ref->file_system_.get()) | 293 file_system_ != new_file_ref->file_system_) |
| 296 return PP_ERROR_NOACCESS; | 294 return PP_ERROR_NOACCESS; |
| 297 | 295 |
| 298 // TODO(viettrungluu): Also cancel when the new file ref is destroyed? | 296 // TODO(viettrungluu): Also cancel when the new file ref is destroyed? |
| 299 // http://crbug.com/67624 | 297 // http://crbug.com/67624 |
| 300 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 298 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 301 if (!plugin_instance) | 299 if (!plugin_instance) |
| 302 return PP_ERROR_FAILED; | 300 return PP_ERROR_FAILED; |
| 303 if (!plugin_instance->delegate()->Rename( | 301 if (!plugin_instance->delegate()->Rename( |
| 304 GetFileSystemURL(), new_file_ref->GetFileSystemURL(), | 302 GetFileSystemURL(), new_file_ref->GetFileSystemURL(), |
| 305 new FileCallbacks(this, callback, NULL, NULL))) | 303 new FileCallbacks(this, callback, NULL))) |
| 306 return PP_ERROR_FAILED; | 304 return PP_ERROR_FAILED; |
| 307 return PP_OK_COMPLETIONPENDING; | 305 return PP_OK_COMPLETIONPENDING; |
| 308 } | 306 } |
| 309 | 307 |
| 310 PP_Var PPB_FileRef_Impl::GetAbsolutePath() { | 308 PP_Var PPB_FileRef_Impl::GetAbsolutePath() { |
| 311 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) | 309 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) |
| 312 return GetPath(); | 310 return GetPath(); |
| 313 if (!external_path_var_.get()) { | 311 if (!external_path_var_.get()) { |
| 314 external_path_var_ = new StringVar( | 312 external_path_var_ = new StringVar( |
| 315 external_file_system_path_.AsUTF8Unsafe()); | 313 external_file_system_path_.AsUTF8Unsafe()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 333 return GURL(); | 331 return GURL(); |
| 334 } | 332 } |
| 335 | 333 |
| 336 const std::string& virtual_path = GetCreateInfo().path; | 334 const std::string& virtual_path = GetCreateInfo().path; |
| 337 CHECK(!virtual_path.empty()); // Should always be at least "/". | 335 CHECK(!virtual_path.empty()); // Should always be at least "/". |
| 338 | 336 |
| 339 // Since |virtual_path_| starts with a '/', it looks like an absolute path. | 337 // Since |virtual_path_| starts with a '/', it looks like an absolute path. |
| 340 // We need to trim off the '/' before calling Resolve, as FileSystem URLs | 338 // We need to trim off the '/' before calling Resolve, as FileSystem URLs |
| 341 // start with a storage type identifier that looks like a path segment. | 339 // start with a storage type identifier that looks like a path segment. |
| 342 | 340 |
| 343 return file_system_->root_url().Resolve( | 341 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 344 net::EscapePath(virtual_path.substr(1))); | 342 PluginDelegate* delegate = |
| 343 plugin_instance ? plugin_instance->delegate() : NULL; |
| 344 if (!delegate) |
| 345 return GURL(); |
| 346 return GURL(delegate->GetFileSystemRootUrl(pp_instance(), file_system_)) |
| 347 .Resolve(net::EscapePath(virtual_path.substr(1))); |
| 348 } |
| 349 |
| 350 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { |
| 351 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 352 PluginDelegate* delegate = |
| 353 plugin_instance ? plugin_instance->delegate() : NULL; |
| 354 return delegate && |
| 355 delegate->IsFileSystemOpened(pp_instance(), file_system_) && |
| 356 delegate->GetFileSystemType(pp_instance(), file_system_) != |
| 357 PP_FILESYSTEMTYPE_EXTERNAL; |
| 345 } | 358 } |
| 346 | 359 |
| 347 bool PPB_FileRef_Impl::HasValidFileSystem() const { | 360 bool PPB_FileRef_Impl::HasValidFileSystem() const { |
| 348 return file_system_ && file_system_->opened(); | 361 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 349 } | 362 PluginDelegate* delegate = |
| 350 | 363 plugin_instance ? plugin_instance->delegate() : NULL; |
| 351 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { | 364 return delegate && delegate->IsFileSystemOpened(pp_instance(), file_system_); |
| 352 return file_system_ && file_system_->opened() && | |
| 353 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL; | |
| 354 } | 365 } |
| 355 | 366 |
| 356 int32_t PPB_FileRef_Impl::Query(PP_FileInfo* info, | 367 int32_t PPB_FileRef_Impl::Query(PP_FileInfo* info, |
| 357 scoped_refptr<TrackedCallback> callback) { | 368 scoped_refptr<TrackedCallback> callback) { |
| 358 scoped_refptr<PluginInstance> plugin_instance = | 369 scoped_refptr<PluginInstance> plugin_instance = |
| 359 ResourceHelper::GetPluginInstance(this); | 370 ResourceHelper::GetPluginInstance(this); |
| 360 if (!plugin_instance.get()) | 371 if (!plugin_instance.get()) |
| 361 return PP_ERROR_FAILED; | 372 return PP_ERROR_FAILED; |
| 362 | 373 |
| 363 if (!file_system_) { | 374 if (!file_system_) { |
| 364 // External file system | 375 // External file system |
| 365 // We have to do something totally different for external file systems. | 376 // We have to do something totally different for external file systems. |
| 366 | 377 |
| 367 // TODO(teravest): Use the SequencedWorkerPool instead. | 378 // TODO(teravest): Use the SequencedWorkerPool instead. |
| 368 scoped_refptr<base::TaskRunner> task_runner = | 379 scoped_refptr<base::TaskRunner> task_runner = |
| 369 plugin_instance->delegate()->GetFileThreadMessageLoopProxy(); | 380 plugin_instance->delegate()->GetFileThreadMessageLoopProxy(); |
| 370 if (!plugin_instance->delegate()->AsyncOpenFile( | 381 if (!plugin_instance->delegate()->AsyncOpenFile( |
| 371 GetSystemPath(), | 382 GetSystemPath(), |
| 372 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, | 383 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, |
| 373 base::Bind(&QueryCallback, task_runner, info, callback))) | 384 base::Bind(&QueryCallback, task_runner, info, callback))) |
| 374 return PP_ERROR_FAILED; | 385 return PP_ERROR_FAILED; |
| 375 } else { | 386 } else { |
| 376 // Non-external file system | 387 // Non-external file system |
| 377 if (!HasValidFileSystem()) | 388 if (!HasValidFileSystem()) |
| 378 return PP_ERROR_NOACCESS; | 389 return PP_ERROR_NOACCESS; |
| 379 | 390 |
| 391 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 392 PluginDelegate* delegate = |
| 393 plugin_instance ? plugin_instance->delegate() : NULL; |
| 394 if (!delegate) |
| 395 return PP_ERROR_FAILED; |
| 396 |
| 380 if (!plugin_instance->delegate()->Query( | 397 if (!plugin_instance->delegate()->Query( |
| 381 GetFileSystemURL(), | 398 GetFileSystemURL(), |
| 382 new FileCallbacks(this, callback, info, file_system_))) | 399 new FileCallbacks(this, callback, info, |
| 400 delegate->GetFileSystemType(pp_instance(), |
| 401 file_system_)))) |
| 383 return PP_ERROR_FAILED; | 402 return PP_ERROR_FAILED; |
| 384 | 403 |
| 385 } | 404 } |
| 386 return PP_OK_COMPLETIONPENDING; | 405 return PP_OK_COMPLETIONPENDING; |
| 387 } | 406 } |
| 388 | 407 |
| 389 } // namespace ppapi | 408 } // namespace ppapi |
| 390 } // namespace webkit | 409 } // namespace webkit |
| OLD | NEW |