diff --git a/include/capi/cef_urlrequest_capi.h b/include/capi/cef_urlrequest_capi.h index 8ade45be5..cf95f268b 100644 --- a/include/capi/cef_urlrequest_capi.h +++ b/include/capi/cef_urlrequest_capi.h @@ -146,7 +146,7 @@ typedef struct _cef_urlrequest_client_t { // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. /// void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request, uint64 current, uint64 total); + struct _cef_urlrequest_t* request, int64 current, int64 total); /// // Notifies the client of download progress. |current| denotes the number of @@ -155,7 +155,7 @@ typedef struct _cef_urlrequest_client_t { /// void (CEF_CALLBACK *on_download_progress)( struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request, - uint64 current, uint64 total); + int64 current, int64 total); /// // Called when some part of the response is read. |data| contains the current diff --git a/include/cef_urlrequest.h b/include/cef_urlrequest.h index 02a9da684..1a4e839fe 100644 --- a/include/cef_urlrequest.h +++ b/include/cef_urlrequest.h @@ -140,8 +140,8 @@ class CefURLRequestClient : public virtual CefBase { /// /*--cef()--*/ virtual void OnUploadProgress(CefRefPtr request, - uint64 current, - uint64 total) =0; + int64 current, + int64 total) =0; /// // Notifies the client of download progress. |current| denotes the number of @@ -150,8 +150,8 @@ class CefURLRequestClient : public virtual CefBase { /// /*--cef()--*/ virtual void OnDownloadProgress(CefRefPtr request, - uint64 current, - uint64 total) =0; + int64 current, + int64 total) =0; /// // Called when some part of the response is read. |data| contains the current diff --git a/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc index 080832161..52d9581a0 100644 --- a/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc +++ b/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc @@ -36,7 +36,7 @@ void CEF_CALLBACK urlrequest_client_on_request_complete( void CEF_CALLBACK urlrequest_client_on_upload_progress( struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - uint64 current, uint64 total) { + int64 current, int64 total) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING DCHECK(self); @@ -56,7 +56,7 @@ void CEF_CALLBACK urlrequest_client_on_upload_progress( void CEF_CALLBACK urlrequest_client_on_download_progress( struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - uint64 current, uint64 total) { + int64 current, int64 total) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING DCHECK(self); diff --git a/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc b/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc index 8f4b11f6e..c3e3560d0 100644 --- a/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc +++ b/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc @@ -35,7 +35,7 @@ void CefURLRequestClientCToCpp::OnRequestComplete( } void CefURLRequestClientCToCpp::OnUploadProgress( - CefRefPtr request, uint64 current, uint64 total) { + CefRefPtr request, int64 current, int64 total) { if (CEF_MEMBER_MISSING(struct_, on_upload_progress)) return; @@ -54,7 +54,7 @@ void CefURLRequestClientCToCpp::OnUploadProgress( } void CefURLRequestClientCToCpp::OnDownloadProgress( - CefRefPtr request, uint64 current, uint64 total) { + CefRefPtr request, int64 current, int64 total) { if (CEF_MEMBER_MISSING(struct_, on_download_progress)) return; diff --git a/libcef_dll/ctocpp/urlrequest_client_ctocpp.h b/libcef_dll/ctocpp/urlrequest_client_ctocpp.h index 1a4444e2e..3c2e61640 100644 --- a/libcef_dll/ctocpp/urlrequest_client_ctocpp.h +++ b/libcef_dll/ctocpp/urlrequest_client_ctocpp.h @@ -34,10 +34,10 @@ class CefURLRequestClientCToCpp // CefURLRequestClient methods void OnRequestComplete(CefRefPtr request) override; - void OnUploadProgress(CefRefPtr request, uint64 current, - uint64 total) override; - void OnDownloadProgress(CefRefPtr request, uint64 current, - uint64 total) override; + void OnUploadProgress(CefRefPtr request, int64 current, + int64 total) override; + void OnDownloadProgress(CefRefPtr request, int64 current, + int64 total) override; void OnDownloadData(CefRefPtr request, const void* data, size_t data_length) override; bool GetAuthCredentials(bool isProxy, const CefString& host, int port, diff --git a/tests/unittests/urlrequest_unittest.cc b/tests/unittests/urlrequest_unittest.cc index 98bb1caa4..737624114 100644 --- a/tests/unittests/urlrequest_unittest.cc +++ b/tests/unittests/urlrequest_unittest.cc @@ -445,15 +445,15 @@ class RequestClient : public CefURLRequestClient { } void OnUploadProgress(CefRefPtr request, - uint64 current, - uint64 total) override { + int64 current, + int64 total) override { upload_progress_ct_++; upload_total_ = total; } void OnDownloadProgress(CefRefPtr request, - uint64 current, - uint64 total) override { + int64 current, + int64 total) override { response_ = request->GetResponse(); EXPECT_TRUE(response_.get()); EXPECT_TRUE(response_->IsReadOnly()); @@ -1120,14 +1120,14 @@ class InvalidURLTestClient : public CefURLRequestClient { } void OnUploadProgress(CefRefPtr request, - uint64 current, - uint64 total) override { + int64 current, + int64 total) override { EXPECT_TRUE(false); // Not reached. } void OnDownloadProgress(CefRefPtr request, - uint64 current, - uint64 total) override { + int64 current, + int64 total) override { EXPECT_TRUE(false); // Not reached. }