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_PUBLIC_TEST_TEST_URL_LOADER_CLIENT_H_ |
6 #define CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_URL_LOADER_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "content/public/common/resource_request_completion_status.h" | 13 #include "content/public/common/resource_request_completion_status.h" |
14 #include "content/public/common/resource_response.h" | 14 #include "content/public/common/resource_response.h" |
15 #include "content/public/common/url_loader.mojom.h" | 15 #include "content/public/common/url_loader.mojom.h" |
16 #include "content/public/common/url_loader_factory.mojom.h" | 16 #include "content/public/common/url_loader_factory.mojom.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
53 bool has_received_cached_metadata() const { | 53 bool has_received_cached_metadata() const { |
54 return has_received_cached_metadata_; | 54 return has_received_cached_metadata_; |
55 } | 55 } |
56 bool has_received_completion() const { return has_received_completion_; } | 56 bool has_received_completion() const { return has_received_completion_; } |
57 const ResourceResponseHead& response_head() const { return response_head_; } | 57 const ResourceResponseHead& response_head() const { return response_head_; } |
58 const base::Optional<net::SSLInfo>& ssl_info() const { return ssl_info_; } | 58 const base::Optional<net::SSLInfo>& ssl_info() const { return ssl_info_; } |
59 const net::RedirectInfo& redirect_info() const { return redirect_info_; } | 59 const net::RedirectInfo& redirect_info() const { return redirect_info_; } |
60 const std::string& cached_metadata() const { | 60 const std::string& cached_metadata() const { return cached_metadata_; } |
61 return cached_metadata_; | |
62 } | |
63 mojo::DataPipeConsumerHandle response_body() { return response_body_.get(); } | 61 mojo::DataPipeConsumerHandle response_body() { return response_body_.get(); } |
64 mojo::ScopedDataPipeConsumerHandle response_body_release() { | 62 mojo::ScopedDataPipeConsumerHandle response_body_release() { |
65 return std::move(response_body_); | 63 return std::move(response_body_); |
66 } | 64 } |
67 const ResourceRequestCompletionStatus& completion_status() const { | 65 const ResourceRequestCompletionStatus& completion_status() const { |
68 return completion_status_; | 66 return completion_status_; |
69 } | 67 } |
70 int64_t download_data_length() const { return download_data_length_; } | 68 int64_t download_data_length() const { return download_data_length_; } |
71 int64_t encoded_download_data_length() const { | 69 int64_t encoded_download_data_length() const { |
72 return encoded_download_data_length_; | 70 return encoded_download_data_length_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 int64_t encoded_download_data_length_ = 0; | 122 int64_t encoded_download_data_length_ = 0; |
125 int64_t body_transfer_size_ = 0; | 123 int64_t body_transfer_size_ = 0; |
126 int64_t current_upload_position_ = 0; | 124 int64_t current_upload_position_ = 0; |
127 int64_t total_upload_size_ = 0; | 125 int64_t total_upload_size_ = 0; |
128 | 126 |
129 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); | 127 DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); |
130 }; | 128 }; |
131 | 129 |
132 } // namespace content | 130 } // namespace content |
133 | 131 |
134 #endif // CONTENT_BROWSER_LOADER_TEST_URL_LOADER_CLIENT_H_ | 132 #endif // CONTENT_PUBLIC_TEST_TEST_URL_LOADER_CLIENT_H_ |
OLD | NEW |