Chromium Code Reviews| Index: import/cross/tar_generator.h |
| =================================================================== |
| --- import/cross/tar_generator.h (revision 21085) |
| +++ import/cross/tar_generator.h (working copy) |
| @@ -67,7 +67,7 @@ |
| // Call AddFile() for each file entry, followed by calls to AddFileBytes() |
| // for the file's data |
| - virtual void AddFile(const String &file_name, |
| + virtual bool AddFile(const String &file_name, |
|
Chris Rogers
2009/07/21 19:14:28
add comment about return value
|
| size_t file_size); |
| // Call to "push" bytes to be processed - our client will get called back |
| @@ -79,16 +79,25 @@ |
| virtual void Finalize(); |
| private: |
| - void AddEntry(const String &file_name, |
| + bool AddEntry(const String &file_name, |
|
Chris Rogers
2009/07/21 19:14:28
add comment about return value
|
| size_t file_size, |
| bool is_directory); |
| - void AddDirectory(const String &file_name); |
| - void AddDirectoryEntryIfNeeded(const String &file_name); |
| + bool AddDirectory(const String &file_name); |
|
Chris Rogers
2009/07/21 19:14:28
comment about return value
|
| + bool AddDirectoryEntryIfNeeded(const String &file_name); |
| // Checksum for each header |
| void ComputeCheckSum(uint8 *header); |
| + // Writes a head block. |
| + void WriteHeader(const String& filename, |
| + size_t file_size, |
| + char type, |
| + int mode, |
| + int user_id, |
| + int group_id, |
| + int mod_time); |
| + |
| // flushes buffered file data to the client callback |
| // if |flush_padding_zeroes| is |true| then flush a complete block |
| // with zero padding even if less was buffered |