Keep archive's file opened in the archive's whole life time

This commit is contained in:
Cheng Zhao 2015-05-11 10:47:07 +08:00
parent f02cae1b0a
commit f8e1dfbbc6
4 changed files with 15 additions and 10 deletions

View file

@ -7,6 +7,10 @@
#include "base/files/file_path.h"
namespace base {
class File;
}
namespace asar {
// An object representing a temporary file that should be cleaned up when this
@ -22,7 +26,7 @@ class ScopedTemporaryFile {
bool Init();
// Init an temporary file and fill it with content of |path|.
bool InitFromFile(const base::FilePath& path, uint64 offset, uint64 size);
bool InitFromFile(base::File& src, uint64 offset, uint64 size);
base::FilePath path() const { return path_; }