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

Side by Side Diff: webkit/fileapi/file_system_directory_database.h

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 | « base/file_util_win.cc ('k') | webkit/fileapi/file_system_file_util.cc » ('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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 20 matching lines...) Expand all
31 // done elsewhere]. 31 // done elsewhere].
32 // TODO(ericu): Add a method that will give a unique filename for a data file. 32 // TODO(ericu): Add a method that will give a unique filename for a data file.
33 class FileSystemDirectoryDatabase { 33 class FileSystemDirectoryDatabase {
34 public: 34 public:
35 typedef int64 FileId; 35 typedef int64 FileId;
36 36
37 struct FileInfo { 37 struct FileInfo {
38 FileInfo(); 38 FileInfo();
39 ~FileInfo(); 39 ~FileInfo();
40 40
41 bool is_directory() { 41 bool is_directory() const {
42 return data_path.empty(); 42 return data_path.empty();
43 } 43 }
44 44
45 FileId parent_id; 45 FileId parent_id;
46 FilePath data_path; 46 FilePath data_path;
47 FilePath::StringType name; 47 FilePath::StringType name;
48 // This modification time is valid only for directories, not files, as 48 // This modification time is valid only for directories, not files, as
49 // FileWriter will get the files out of sync. 49 // FileWriter will get the files out of sync.
50 // For files, look at the modification time of the underlying data_path. 50 // For files, look at the modification time of the underlying data_path.
51 base::Time modification_time; 51 base::Time modification_time;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch); 92 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch);
93 void HandleError(leveldb::Status status); 93 void HandleError(leveldb::Status status);
94 94
95 std::string path_; 95 std::string path_;
96 scoped_ptr<leveldb::DB> db_; 96 scoped_ptr<leveldb::DB> db_;
97 }; 97 };
98 98
99 } // namespace fileapi 99 } // namespace fileapi
100 100
101 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ 101 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_
OLDNEW
« no previous file with comments | « base/file_util_win.cc ('k') | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698