| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void OnReceiveResponse(const ResourceResponseHead& response_head, | 32 void OnReceiveResponse(const ResourceResponseHead& response_head, |
| 33 const base::Optional<net::SSLInfo>& ssl_info, | 33 const base::Optional<net::SSLInfo>& ssl_info, |
| 34 mojom::DownloadedTempFilePtr downloaded_file) override; | 34 mojom::DownloadedTempFilePtr downloaded_file) override; |
| 35 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, | 35 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, |
| 36 const ResourceResponseHead& response_head) override; | 36 const ResourceResponseHead& response_head) override; |
| 37 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; | 37 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override; |
| 38 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; | 38 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; |
| 39 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; | 39 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; |
| 40 void OnUploadProgress(int64_t current_position, | 40 void OnUploadProgress(int64_t current_position, |
| 41 int64_t total_size, | 41 int64_t total_size, |
| 42 const base::Closure& ack_callback) override; | 42 OnUploadProgressCallback ack_callback) override; |
| 43 void OnStartLoadingResponseBody( | 43 void OnStartLoadingResponseBody( |
| 44 mojo::ScopedDataPipeConsumerHandle body) override; | 44 mojo::ScopedDataPipeConsumerHandle body) override; |
| 45 void OnComplete(const ResourceRequestCompletionStatus& status) override; | 45 void OnComplete(const ResourceRequestCompletionStatus& status) override; |
| 46 | 46 |
| 47 bool has_received_response() const { return has_received_response_; } | 47 bool has_received_response() const { return has_received_response_; } |
| 48 bool has_received_redirect() const { return has_received_redirect_; } | 48 bool has_received_redirect() const { return has_received_redirect_; } |
| 49 bool has_data_downloaded() const { return has_data_downloaded_; } | 49 bool has_data_downloaded() const { return has_data_downloaded_; } |
| 50 bool has_received_upload_progress() const { | 50 bool has_received_upload_progress() const { |
| 51 return has_received_upload_progress_; | 51 return has_received_upload_progress_; |
| 52 } | 52 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 int64_t body_transfer_size_ = 0; | 115 int64_t body_transfer_size_ = 0; |
| 116 int64_t current_upload_position_ = 0; | 116 int64_t current_upload_position_ = 0; |
| 117 int64_t total_upload_size_ = 0; | 117 int64_t total_upload_size_ = 0; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); | 119 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace content | 122 } // namespace content |
| 123 | 123 |
| 124 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 124 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ |
| OLD | NEW |