| Index: content/browser/loader/async_resource_handler.h
|
| diff --git a/content/browser/loader/async_resource_handler.h b/content/browser/loader/async_resource_handler.h
|
| index 1279d506be3529f17b4208d80e247f5f5e4d2023..fb69ec7bc1e59a02d8b1dc2ac617b47cdfceebb1 100644
|
| --- a/content/browser/loader/async_resource_handler.h
|
| +++ b/content/browser/loader/async_resource_handler.h
|
| @@ -7,11 +7,11 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/timer/timer.h"
|
| #include "content/browser/loader/resource_handler.h"
|
| #include "content/browser/loader/resource_message_delegate.h"
|
| #include "content/common/content_export.h"
|
| @@ -25,6 +25,7 @@ class URLRequest;
|
| namespace content {
|
| class ResourceBuffer;
|
| class ResourceDispatcherHostImpl;
|
| +class UploadProgressTracker;
|
|
|
| // Used to complete an asynchronous resource request in response to resource
|
| // load events from the resource dispatcher host.
|
| @@ -59,8 +60,6 @@ class CONTENT_EXPORT AsyncResourceHandler : public ResourceHandler,
|
| void OnDataReceivedACK(int request_id);
|
| void OnUploadProgressACK(int request_id);
|
|
|
| - void ReportUploadProgress();
|
| -
|
| bool EnsureResourceBufferIsInitialized();
|
| void ResumeIfDeferred();
|
| void OnDefer();
|
| @@ -68,6 +67,7 @@ class CONTENT_EXPORT AsyncResourceHandler : public ResourceHandler,
|
| int CalculateEncodedDataLengthToReport();
|
| int CalculateEncodedBodyLengthToReport();
|
| void RecordHistogram();
|
| + void SendUploadProgress(int64_t current_position, int64_t total_size);
|
|
|
| scoped_refptr<ResourceBuffer> buffer_;
|
| ResourceDispatcherHostImpl* rdh_;
|
| @@ -89,10 +89,7 @@ class CONTENT_EXPORT AsyncResourceHandler : public ResourceHandler,
|
| std::unique_ptr<InliningHelper> inlining_helper_;
|
| base::TimeTicks response_started_ticks_;
|
|
|
| - uint64_t last_upload_position_;
|
| - bool waiting_for_upload_progress_ack_;
|
| - base::TimeTicks last_upload_ticks_;
|
| - base::RepeatingTimer progress_timer_;
|
| + std::unique_ptr<UploadProgressTracker> upload_progress_tracker_;
|
|
|
| int64_t reported_transfer_size_;
|
|
|
|
|