| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| 11 #include "ppapi/shared_impl/time_conversion.h" |
| 11 #include "ppapi/thunk/enter.h" | 12 #include "ppapi/thunk/enter.h" |
| 12 #include "ppapi/thunk/ppb_file_system_api.h" | 13 #include "ppapi/thunk/ppb_file_system_api.h" |
| 13 #include "webkit/plugins/ppapi/common.h" | 14 #include "webkit/plugins/ppapi/common.h" |
| 14 #include "webkit/plugins/ppapi/file_callbacks.h" | 15 #include "webkit/plugins/ppapi/file_callbacks.h" |
| 15 #include "webkit/plugins/ppapi/plugin_delegate.h" | 16 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 16 #include "webkit/plugins/ppapi/plugin_module.h" | 17 #include "webkit/plugins/ppapi/plugin_module.h" |
| 17 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 19 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 20 #include "webkit/plugins/ppapi/time_conversion.h" | |
| 21 #include "webkit/plugins/ppapi/var.h" | 21 #include "webkit/plugins/ppapi/var.h" |
| 22 | 22 |
| 23 using ppapi::PPTimeToTime; |
| 23 using ppapi::thunk::EnterResourceNoLock; | 24 using ppapi::thunk::EnterResourceNoLock; |
| 24 using ppapi::thunk::PPB_FileRef_API; | 25 using ppapi::thunk::PPB_FileRef_API; |
| 25 using ppapi::thunk::PPB_FileSystem_API; | 26 using ppapi::thunk::PPB_FileSystem_API; |
| 26 | 27 |
| 27 namespace webkit { | 28 namespace webkit { |
| 28 namespace ppapi { | 29 namespace ppapi { |
| 29 | 30 |
| 30 namespace { | 31 namespace { |
| 31 | 32 |
| 32 bool IsValidLocalPath(const std::string& path) { | 33 bool IsValidLocalPath(const std::string& path) { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return GURL(file_system_->root_url().spec() + virtual_path_.substr(1)); | 251 return GURL(file_system_->root_url().spec() + virtual_path_.substr(1)); |
| 251 } | 252 } |
| 252 | 253 |
| 253 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { | 254 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { |
| 254 return file_system_ && file_system_->opened() && | 255 return file_system_ && file_system_->opened() && |
| 255 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL; | 256 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL; |
| 256 } | 257 } |
| 257 | 258 |
| 258 } // namespace ppapi | 259 } // namespace ppapi |
| 259 } // namespace webkit | 260 } // namespace webkit |
| OLD | NEW |