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