| 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 "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.
h" | 5 #include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.
h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ppapi::host::HostMessageContext* context, | 166 ppapi::host::HostMessageContext* context, |
| 167 const ppapi::PepperFilePath& path, | 167 const ppapi::PepperFilePath& path, |
| 168 bool recursive) { | 168 bool recursive) { |
| 169 base::FilePath full_path = ValidateAndConvertPepperFilePath( | 169 base::FilePath full_path = ValidateAndConvertPepperFilePath( |
| 170 path, kWritePermissions); | 170 path, kWritePermissions); |
| 171 if (full_path.empty()) { | 171 if (full_path.empty()) { |
| 172 return ppapi::PlatformFileErrorToPepperError( | 172 return ppapi::PlatformFileErrorToPepperError( |
| 173 base::PLATFORM_FILE_ERROR_ACCESS_DENIED); | 173 base::PLATFORM_FILE_ERROR_ACCESS_DENIED); |
| 174 } | 174 } |
| 175 | 175 |
| 176 bool result = base::Delete(full_path, recursive); | 176 bool result = base::DeleteFile(full_path, recursive); |
| 177 return ppapi::PlatformFileErrorToPepperError(result ? | 177 return ppapi::PlatformFileErrorToPepperError(result ? |
| 178 base::PLATFORM_FILE_OK : base::PLATFORM_FILE_ERROR_ACCESS_DENIED); | 178 base::PLATFORM_FILE_OK : base::PLATFORM_FILE_ERROR_ACCESS_DENIED); |
| 179 } | 179 } |
| 180 int32_t PepperFlashFileMessageFilter::OnCreateDir( | 180 int32_t PepperFlashFileMessageFilter::OnCreateDir( |
| 181 ppapi::host::HostMessageContext* context, | 181 ppapi::host::HostMessageContext* context, |
| 182 const ppapi::PepperFilePath& path) { | 182 const ppapi::PepperFilePath& path) { |
| 183 base::FilePath full_path = ValidateAndConvertPepperFilePath( | 183 base::FilePath full_path = ValidateAndConvertPepperFilePath( |
| 184 path, kWritePermissions); | 184 path, kWritePermissions); |
| 185 if (full_path.empty()) { | 185 if (full_path.empty()) { |
| 186 return ppapi::PlatformFileErrorToPepperError( | 186 return ppapi::PlatformFileErrorToPepperError( |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 file_path = plugin_data_directory_.Append(pepper_path.path()); | 300 file_path = plugin_data_directory_.Append(pepper_path.path()); |
| 301 break; | 301 break; |
| 302 default: | 302 default: |
| 303 NOTREACHED(); | 303 NOTREACHED(); |
| 304 break; | 304 break; |
| 305 } | 305 } |
| 306 return file_path; | 306 return file_path; |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace content | 309 } // namespace content |
| OLD | NEW |