OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ |
6 #define CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 6 #define CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 public: | 27 public: |
28 TestURLLoaderClient(); | 28 TestURLLoaderClient(); |
29 ~TestURLLoaderClient() override; | 29 ~TestURLLoaderClient() override; |
30 | 30 |
31 void OnReceiveResponse(const ResourceResponseHead& response_head, | 31 void OnReceiveResponse(const ResourceResponseHead& response_head, |
32 mojom::DownloadedTempFilePtr downloaded_file) override; | 32 mojom::DownloadedTempFilePtr downloaded_file) override; |
33 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, | 33 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, |
34 const ResourceResponseHead& response_head) override; | 34 const ResourceResponseHead& response_head) override; |
35 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; | 35 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; |
36 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; | 36 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; |
| 37 void OnUploadProgress(int64_t current_position, |
| 38 int64_t total_size, |
| 39 const base::Closure& ack_callback) override; |
37 void OnStartLoadingResponseBody( | 40 void OnStartLoadingResponseBody( |
38 mojo::ScopedDataPipeConsumerHandle body) override; | 41 mojo::ScopedDataPipeConsumerHandle body) override; |
39 void OnComplete(const ResourceRequestCompletionStatus& status) override; | 42 void OnComplete(const ResourceRequestCompletionStatus& status) override; |
40 | 43 |
41 bool has_received_response() const { return has_received_response_; } | 44 bool has_received_response() const { return has_received_response_; } |
42 bool has_received_redirect() const { return has_received_redirect_; } | 45 bool has_received_redirect() const { return has_received_redirect_; } |
43 bool has_data_downloaded() const { return has_data_downloaded_; } | 46 bool has_data_downloaded() const { return has_data_downloaded_; } |
44 bool has_received_completion() const { return has_received_completion_; } | 47 bool has_received_completion() const { return has_received_completion_; } |
45 const ResourceResponseHead& response_head() const { return response_head_; } | 48 const ResourceResponseHead& response_head() const { return response_head_; } |
46 const net::RedirectInfo& redirect_info() const { return redirect_info_; } | 49 const net::RedirectInfo& redirect_info() const { return redirect_info_; } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 int64_t download_data_length_ = 0; | 91 int64_t download_data_length_ = 0; |
89 int64_t encoded_download_data_length_ = 0; | 92 int64_t encoded_download_data_length_ = 0; |
90 int64_t body_transfer_size_ = 0; | 93 int64_t body_transfer_size_ = 0; |
91 | 94 |
92 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); | 95 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace content | 98 } // namespace content |
96 | 99 |
97 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 100 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ |
OLD | NEW |