Return CefTime instead of time_t from CefZipReader::GetFileLastModified (issue #1625)
This commit is contained in:
parent
616fdbf3ff
commit
b849e7fb70
|
@ -101,7 +101,8 @@ typedef struct _cef_zip_reader_t {
|
|||
///
|
||||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
time_t (CEF_CALLBACK *get_file_last_modified)(struct _cef_zip_reader_t* self);
|
||||
cef_time_t (CEF_CALLBACK *get_file_last_modified)(
|
||||
struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
|
|
|
@ -103,7 +103,7 @@ class CefZipReader : public virtual CefBase {
|
|||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual time_t GetFileLastModified() =0;
|
||||
virtual CefTime GetFileLastModified() =0;
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
|
|
|
@ -180,11 +180,13 @@ int64 CefZipReaderImpl::GetFileSize() {
|
|||
return filesize_;
|
||||
}
|
||||
|
||||
time_t CefZipReaderImpl::GetFileLastModified() {
|
||||
CefTime CefZipReaderImpl::GetFileLastModified() {
|
||||
CefTime time;
|
||||
if (!VerifyContext() || !GetFileInfo())
|
||||
return 0;
|
||||
return time;
|
||||
|
||||
return filemodified_;
|
||||
cef_time_from_timet(filemodified_, &time);
|
||||
return time;
|
||||
}
|
||||
|
||||
bool CefZipReaderImpl::OpenFile(const CefString& password) {
|
||||
|
|
|
@ -27,7 +27,7 @@ class CefZipReaderImpl : public CefZipReader {
|
|||
bool Close() override;
|
||||
CefString GetFileName() override;
|
||||
int64 GetFileSize() override;
|
||||
time_t GetFileLastModified() override;
|
||||
CefTime GetFileLastModified() override;
|
||||
bool OpenFile(const CefString& password) override;
|
||||
bool CloseFile() override;
|
||||
int ReadFile(void* buffer, size_t bufferSize) override;
|
||||
|
|
|
@ -130,16 +130,16 @@ int64 CEF_CALLBACK zip_reader_get_file_size(struct _cef_zip_reader_t* self) {
|
|||
return _retval;
|
||||
}
|
||||
|
||||
time_t CEF_CALLBACK zip_reader_get_file_last_modified(
|
||||
cef_time_t CEF_CALLBACK zip_reader_get_file_last_modified(
|
||||
struct _cef_zip_reader_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
return CefTime();
|
||||
|
||||
// Execute
|
||||
time_t _retval = CefZipReaderCppToC::Get(self)->GetFileLastModified();
|
||||
cef_time_t _retval = CefZipReaderCppToC::Get(self)->GetFileLastModified();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
|
|
|
@ -130,15 +130,15 @@ int64 CefZipReaderCToCpp::GetFileSize() {
|
|||
return _retval;
|
||||
}
|
||||
|
||||
time_t CefZipReaderCToCpp::GetFileLastModified() {
|
||||
CefTime CefZipReaderCToCpp::GetFileLastModified() {
|
||||
cef_zip_reader_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_file_last_modified))
|
||||
return 0;
|
||||
return CefTime();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
time_t _retval = _struct->get_file_last_modified(_struct);
|
||||
cef_time_t _retval = _struct->get_file_last_modified(_struct);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
|
|
|
@ -36,7 +36,7 @@ class CefZipReaderCToCpp
|
|||
bool Close() OVERRIDE;
|
||||
CefString GetFileName() OVERRIDE;
|
||||
int64 GetFileSize() OVERRIDE;
|
||||
time_t GetFileLastModified() OVERRIDE;
|
||||
CefTime GetFileLastModified() OVERRIDE;
|
||||
bool OpenFile(const CefString& password) OVERRIDE;
|
||||
bool CloseFile() OVERRIDE;
|
||||
int ReadFile(void* buffer, size_t bufferSize) OVERRIDE;
|
||||
|
|
|
@ -392,7 +392,6 @@ _simpletypes = {
|
|||
'unsigned long' : ['unsigned long', '0'],
|
||||
'long long' : ['long long', '0'],
|
||||
'size_t' : ['size_t', '0'],
|
||||
'time_t' : ['time_t', '0'],
|
||||
'bool' : ['int', '0'],
|
||||
'char': ['char', '0'],
|
||||
'char* const': ['char* const', 'NULL'],
|
||||
|
|
Loading…
Reference in New Issue