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

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

Issue 1139323003: Discard duplicate includes of files from storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698