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

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

Issue 7355013: Adding size and last modified time support to FileEnumerator and FileUtilProxy::Entry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 5 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.cc ('k') | no next file » | 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/obfuscated_file_system_file_util.h" 5 #include "webkit/fileapi/obfuscated_file_system_file_util.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 if (!file_info.is_directory()) 222 if (!file_info.is_directory())
223 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 223 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
224 std::vector<FileId> children; 224 std::vector<FileId> children;
225 if (!db->ListChildren(file_id, &children)) { 225 if (!db->ListChildren(file_id, &children)) {
226 NOTREACHED(); 226 NOTREACHED();
227 return base::PLATFORM_FILE_ERROR_FAILED; 227 return base::PLATFORM_FILE_ERROR_FAILED;
228 } 228 }
229 std::vector<FileId>::iterator iter; 229 std::vector<FileId>::iterator iter;
230 for (iter = children.begin(); iter != children.end(); ++iter) { 230 for (iter = children.begin(); iter != children.end(); ++iter) {
231 if (!db->GetFileInfo(*iter, &file_info)) { 231 if (!db->GetFileInfo(*iter, &file_info)) {
kinuko 2011/07/13 05:58:47 seems like now we could (and maybe should) simply
tzik 2011/07/13 07:38:41 Done.
232 NOTREACHED(); 232 NOTREACHED();
233 return base::PLATFORM_FILE_ERROR_FAILED; 233 return base::PLATFORM_FILE_ERROR_FAILED;
234 } 234 }
235
236 FilePath data_path = DataPathToLocalPath(
237 context->src_origin_url(), context->src_type(), file_info.data_path);
238 base::PlatformFileInfo platform_file_info;
239 if (!file_util::GetFileInfo(data_path, &platform_file_info)) {
240 NOTREACHED();
241 return base::PLATFORM_FILE_ERROR_FAILED;
242 }
243
235 base::FileUtilProxy::Entry entry; 244 base::FileUtilProxy::Entry entry;
236 entry.name = file_info.name; 245 entry.name = file_info.name;
237 entry.is_directory = file_info.is_directory(); 246 entry.is_directory = file_info.is_directory();
247 entry.size = platform_file_info.size;
248 entry.last_modified_time = platform_file_info.last_modified;
238 entries->push_back(entry); 249 entries->push_back(entry);
239 } 250 }
240 return base::PLATFORM_FILE_OK; 251 return base::PLATFORM_FILE_OK;
241 } 252 }
242 253
243 PlatformFileError ObfuscatedFileSystemFileUtil::CreateDirectory( 254 PlatformFileError ObfuscatedFileSystemFileUtil::CreateDirectory(
244 FileSystemOperationContext* context, 255 FileSystemOperationContext* context,
245 const FilePath& virtual_path, 256 const FilePath& virtual_path,
246 bool exclusive, 257 bool exclusive,
247 bool recursive) { 258 bool recursive) {
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 return false; 1058 return false;
1048 } 1059 }
1049 origin_database_.reset( 1060 origin_database_.reset(
1050 new FileSystemOriginDatabase( 1061 new FileSystemOriginDatabase(
1051 file_system_directory_.AppendASCII(kOriginDatabaseName))); 1062 file_system_directory_.AppendASCII(kOriginDatabaseName)));
1052 } 1063 }
1053 return true; 1064 return true;
1054 } 1065 }
1055 1066
1056 } // namespace fileapi 1067 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698