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/browser/fileapi/native_file_util.h" | 5 #include "webkit/browser/fileapi/native_file_util.h" |
6 | 6 |
7 #include "base/file_util.h" | |
8 #include "base/files/file.h" | 7 #include "base/files/file.h" |
9 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
| 9 #include "base/files/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "webkit/browser/fileapi/file_system_operation_context.h" | 11 #include "webkit/browser/fileapi/file_system_operation_context.h" |
12 #include "webkit/browser/fileapi/file_system_url.h" | 12 #include "webkit/browser/fileapi/file_system_url.h" |
13 | 13 |
14 namespace storage { | 14 namespace storage { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Sets permissions on directory at |dir_path| based on the target platform. | 18 // Sets permissions on directory at |dir_path| based on the target platform. |
19 // Returns true on success, or false otherwise. | 19 // Returns true on success, or false otherwise. |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (!base::DirectoryExists(path)) | 306 if (!base::DirectoryExists(path)) |
307 return base::File::FILE_ERROR_NOT_A_DIRECTORY; | 307 return base::File::FILE_ERROR_NOT_A_DIRECTORY; |
308 if (!base::IsDirectoryEmpty(path)) | 308 if (!base::IsDirectoryEmpty(path)) |
309 return base::File::FILE_ERROR_NOT_EMPTY; | 309 return base::File::FILE_ERROR_NOT_EMPTY; |
310 if (!base::DeleteFile(path, false)) | 310 if (!base::DeleteFile(path, false)) |
311 return base::File::FILE_ERROR_FAILED; | 311 return base::File::FILE_ERROR_FAILED; |
312 return base::File::FILE_OK; | 312 return base::File::FILE_OK; |
313 } | 313 } |
314 | 314 |
315 } // namespace storage | 315 } // namespace storage |
OLD | NEW |