Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Side by Side Diff: content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 = file_util::Delete(full_path, recursive); 176 bool result = base::Delete(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
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
OLDNEW
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store.cc ('k') | content/browser/storage_partition_impl_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698