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

Side by Side Diff: webkit/fileapi/local_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, 8 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/local_file_system_file_util.h ('k') | webkit/plugins/ppapi/file_callbacks.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/local_file_system_file_util.h" 5 #include "webkit/fileapi/local_file_system_file_util.h"
6 6
7 #include "base/file_util_proxy.h" 7 #include "base/file_util_proxy.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "webkit/fileapi/file_system_context.h" 9 #include "webkit/fileapi/file_system_context.h"
10 #include "webkit/fileapi/file_system_operation_context.h" 10 #include "webkit/fileapi/file_system_operation_context.h"
(...skipping 29 matching lines...) Expand all
40 file_path); 40 file_path);
41 if (local_path.empty()) 41 if (local_path.empty())
42 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION; 42 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
43 return FileSystemFileUtil::GetInstance()->EnsureFileExists( 43 return FileSystemFileUtil::GetInstance()->EnsureFileExists(
44 context, local_path, created); 44 context, local_path, created);
45 } 45 }
46 46
47 PlatformFileError LocalFileSystemFileUtil::GetFileInfo( 47 PlatformFileError LocalFileSystemFileUtil::GetFileInfo(
48 FileSystemOperationContext* context, 48 FileSystemOperationContext* context,
49 const FilePath& file_path, 49 const FilePath& file_path,
50 base::PlatformFileInfo* file_info) { 50 base::PlatformFileInfo* file_info,
51 FilePath* platform_file_path) {
51 FilePath local_path = 52 FilePath local_path =
52 GetLocalPath(context, context->src_origin_url(), context->src_type(), 53 GetLocalPath(context, context->src_origin_url(), context->src_type(),
53 file_path); 54 file_path);
54 if (local_path.empty()) 55 if (local_path.empty())
55 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION; 56 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
56 return FileSystemFileUtil::GetInstance()->GetFileInfo( 57 return FileSystemFileUtil::GetInstance()->GetFileInfo(
57 context, local_path, file_info); 58 context, local_path, file_info, platform_file_path);
58 } 59 }
59 60
60 PlatformFileError LocalFileSystemFileUtil::ReadDirectory( 61 PlatformFileError LocalFileSystemFileUtil::ReadDirectory(
61 FileSystemOperationContext* context, 62 FileSystemOperationContext* context,
62 const FilePath& file_path, 63 const FilePath& file_path,
63 std::vector<base::FileUtilProxy::Entry>* entries) { 64 std::vector<base::FileUtilProxy::Entry>* entries) {
64 // TODO(kkanetkar): Implement directory read in multiple chunks. 65 // TODO(kkanetkar): Implement directory read in multiple chunks.
65 FilePath local_path = 66 FilePath local_path =
66 GetLocalPath(context, context->src_origin_url(), context->src_type(), 67 GetLocalPath(context, context->src_origin_url(), context->src_type(),
67 file_path); 68 file_path);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 FileSystemType type, 170 FileSystemType type,
170 const FilePath& virtual_path) { 171 const FilePath& virtual_path) {
171 FilePath root = context->file_system_context()->path_manager()-> 172 FilePath root = context->file_system_context()->path_manager()->
172 GetFileSystemRootPathOnFileThread(origin_url, type, virtual_path, false); 173 GetFileSystemRootPathOnFileThread(origin_url, type, virtual_path, false);
173 if (root.empty()) 174 if (root.empty())
174 return FilePath(); 175 return FilePath();
175 return root.Append(virtual_path); 176 return root.Append(virtual_path);
176 } 177 }
177 178
178 } // namespace fileapi 179 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_system_file_util.h ('k') | webkit/plugins/ppapi/file_callbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698