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

Side by Side Diff: webkit/browser/fileapi/native_file_util.cc

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « rlz/chromeos/lib/rlz_value_store_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/browser/fileapi/native_file_util.h" 5 #include "webkit/browser/fileapi/native_file_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "webkit/browser/fileapi/file_system_operation_context.h" 10 #include "webkit/browser/fileapi/file_system_operation_context.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (!base::DeleteFile(path, false)) 257 if (!base::DeleteFile(path, false))
258 return base::PLATFORM_FILE_ERROR_FAILED; 258 return base::PLATFORM_FILE_ERROR_FAILED;
259 return base::PLATFORM_FILE_OK; 259 return base::PLATFORM_FILE_OK;
260 } 260 }
261 261
262 PlatformFileError NativeFileUtil::DeleteDirectory(const base::FilePath& path) { 262 PlatformFileError NativeFileUtil::DeleteDirectory(const base::FilePath& path) {
263 if (!base::PathExists(path)) 263 if (!base::PathExists(path))
264 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 264 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
265 if (!base::DirectoryExists(path)) 265 if (!base::DirectoryExists(path))
266 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY; 266 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
267 if (!file_util::IsDirectoryEmpty(path)) 267 if (!base::IsDirectoryEmpty(path))
268 return base::PLATFORM_FILE_ERROR_NOT_EMPTY; 268 return base::PLATFORM_FILE_ERROR_NOT_EMPTY;
269 if (!base::DeleteFile(path, false)) 269 if (!base::DeleteFile(path, false))
270 return base::PLATFORM_FILE_ERROR_FAILED; 270 return base::PLATFORM_FILE_ERROR_FAILED;
271 return base::PLATFORM_FILE_OK; 271 return base::PLATFORM_FILE_OK;
272 } 272 }
273 273
274 } // namespace fileapi 274 } // namespace fileapi
OLDNEW
« no previous file with comments | « rlz/chromeos/lib/rlz_value_store_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698