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

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

Issue 15859007: Move browser-specific FileAPI code from webkit/fileapi to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dump_file_system build fix Created 7 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 | 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 "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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "webkit/fileapi/file_system_operation_context.h" 9 #include "webkit/browser/fileapi/file_system_operation_context.h"
10 10
11 namespace fileapi { 11 namespace fileapi {
12 12
13 namespace { 13 namespace {
14 14
15 // Sets permissions on directory at |dir_path| based on the target platform. 15 // Sets permissions on directory at |dir_path| based on the target platform.
16 // Returns true on success, or false otherwise. 16 // Returns true on success, or false otherwise.
17 // 17 //
18 // TODO(benchan): Find a better place outside webkit to host this function. 18 // TODO(benchan): Find a better place outside webkit to host this function.
19 bool SetPlatformSpecificDirectoryPermissions(const base::FilePath& dir_path) { 19 bool SetPlatformSpecificDirectoryPermissions(const base::FilePath& dir_path) {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (!file_util::DirectoryExists(path)) 256 if (!file_util::DirectoryExists(path))
257 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY; 257 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
258 if (!file_util::IsDirectoryEmpty(path)) 258 if (!file_util::IsDirectoryEmpty(path))
259 return base::PLATFORM_FILE_ERROR_NOT_EMPTY; 259 return base::PLATFORM_FILE_ERROR_NOT_EMPTY;
260 if (!file_util::Delete(path, false)) 260 if (!file_util::Delete(path, false))
261 return base::PLATFORM_FILE_ERROR_FAILED; 261 return base::PLATFORM_FILE_ERROR_FAILED;
262 return base::PLATFORM_FILE_OK; 262 return base::PLATFORM_FILE_OK;
263 } 263 }
264 264
265 } // namespace fileapi 265 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/mock_file_system_options.h ('k') | webkit/browser/fileapi/obfuscated_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698