Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: content/browser/loader/mojo_async_resource_handler.h

Issue 2574143003: Implement upload progress handling in Mojo loading (Closed)
Patch Set: update TestExpectations Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/mojo_async_resource_handler.h
diff --git a/content/browser/loader/mojo_async_resource_handler.h b/content/browser/loader/mojo_async_resource_handler.h
index 81a2f85a61140d5f7ec0c96435d9da48b3328fc1..ce1d3212396736a75f264660ddbfadf68434ca8c 100644
--- a/content/browser/loader/mojo_async_resource_handler.h
+++ b/content/browser/loader/mojo_async_resource_handler.h
@@ -28,6 +28,7 @@ class URLRequest;
namespace content {
class ResourceDispatcherHostImpl;
+class UploadProgressTracker;
struct ResourceResponse;
// Used to complete an asynchronous resource request in response to resource
@@ -96,6 +97,8 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
void OnTransfer(mojom::URLLoaderAssociatedRequest mojo_request,
mojom::URLLoaderClientAssociatedPtr url_loader_client);
+ void OnUploadProgressACK();
+ void SendUploadProgress(int64_t current_position, int64_t total_size);
ResourceDispatcherHostImpl* rdh_;
mojo::AssociatedBinding<mojom::URLLoader> binding_;
@@ -116,6 +119,8 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
size_t buffer_bytes_read_ = 0;
scoped_refptr<SharedWriter> shared_writer_;
+ std::unique_ptr<UploadProgressTracker> upload_progress_tracker_;
+
base::WeakPtrFactory<MojoAsyncResourceHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler);
};

Powered by Google App Engine
This is Rietveld 408576698