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

Side by Side Diff: webkit/fileapi/file_system_file_util.cc

Issue 6731033: Remove the path from PlatformFileInfo; it's cleaner just to pass it along as a (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « webkit/fileapi/file_system_file_util.h ('k') | webkit/fileapi/file_system_file_util_proxy.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/fileapi/file_system_file_util.h" 5 #include "webkit/fileapi/file_system_file_util.h"
6 6
7 #include "base/file_util_proxy.h" 7 #include "base/file_util_proxy.h"
8 8
9 namespace fileapi { 9 namespace fileapi {
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 error_code = base::PLATFORM_FILE_OK; 54 error_code = base::PLATFORM_FILE_OK;
55 } 55 }
56 if (handle != base::kInvalidPlatformFileValue) 56 if (handle != base::kInvalidPlatformFileValue)
57 base::ClosePlatformFile(handle); 57 base::ClosePlatformFile(handle);
58 return error_code; 58 return error_code;
59 } 59 }
60 60
61 PlatformFileError FileSystemFileUtil::GetFileInfo( 61 PlatformFileError FileSystemFileUtil::GetFileInfo(
62 FileSystemOperationContext* unused, 62 FileSystemOperationContext* unused,
63 const FilePath& file_path, 63 const FilePath& file_path,
64 base::PlatformFileInfo* file_info) { 64 base::PlatformFileInfo* file_info,
65 FilePath* platform_file_path) {
65 if (!file_util::PathExists(file_path)) 66 if (!file_util::PathExists(file_path))
66 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 67 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
67 if (!file_util::GetFileInfo(file_path, file_info)) 68 if (!file_util::GetFileInfo(file_path, file_info))
68 return base::PLATFORM_FILE_ERROR_FAILED; 69 return base::PLATFORM_FILE_ERROR_FAILED;
69 file_info->path = file_path; 70 *platform_file_path = file_path;
70 return base::PLATFORM_FILE_OK; 71 return base::PLATFORM_FILE_OK;
71 } 72 }
72 73
73 PlatformFileError FileSystemFileUtil::ReadDirectory( 74 PlatformFileError FileSystemFileUtil::ReadDirectory(
74 FileSystemOperationContext* unused, 75 FileSystemOperationContext* unused,
75 const FilePath& file_path, 76 const FilePath& file_path,
76 std::vector<base::FileUtilProxy::Entry>* entries) { 77 std::vector<base::FileUtilProxy::Entry>* entries) {
77 // TODO(kkanetkar): Implement directory read in multiple chunks. 78 // TODO(kkanetkar): Implement directory read in multiple chunks.
78 if (!file_util::DirectoryExists(file_path)) 79 if (!file_util::DirectoryExists(file_path))
79 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 80 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return file_util::DirectoryExists(file_path); 262 return file_util::DirectoryExists(file_path);
262 } 263 }
263 264
264 bool FileSystemFileUtil::IsDirectoryEmpty( 265 bool FileSystemFileUtil::IsDirectoryEmpty(
265 FileSystemOperationContext* unused, 266 FileSystemOperationContext* unused,
266 const FilePath& file_path) { 267 const FilePath& file_path) {
267 return file_util::IsDirectoryEmpty(file_path); 268 return file_util::IsDirectoryEmpty(file_path);
268 } 269 }
269 270
270 } // namespace fileapi 271 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util.h ('k') | webkit/fileapi/file_system_file_util_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698