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

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

Issue 2566943002: Dispatch transfer size update notification on mojo-loading (Closed)
Patch Set: fix 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/test_url_loader_client.h
diff --git a/content/browser/loader/test_url_loader_client.h b/content/browser/loader/test_url_loader_client.h
index 7fa83cf463487f11243d7d4cf3cc01e86136aa18..ad38fac593caabf73abd2e0e2998e71af45e6a58 100644
--- a/content/browser/loader/test_url_loader_client.h
+++ b/content/browser/loader/test_url_loader_client.h
@@ -33,6 +33,7 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
const ResourceResponseHead& response_head) override;
void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override;
+ void OnTransferSizeUpdated(int64_t transfer_size_diff) override;
void OnStartLoadingResponseBody(
mojo::ScopedDataPipeConsumerHandle body) override;
void OnComplete(const ResourceRequestCompletionStatus& status) override;
@@ -51,6 +52,7 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
int64_t encoded_download_data_length() const {
return encoded_download_data_length_;
}
+ int64_t body_transfer_size() const { return body_transfer_size_; }
void ClearHasReceivedRedirect();
// Creates an AssociatedPtrInfo, binds it to |*this| and returns it. The
@@ -85,6 +87,7 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
mojom::URLLoaderFactoryPtr url_loader_factory_;
int64_t download_data_length_ = 0;
int64_t encoded_download_data_length_ = 0;
+ int64_t body_transfer_size_ = 0;
DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient);
};

Powered by Google App Engine
This is Rietveld 408576698