| 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_CHILD_TEST_REQUEST_PEER_H_ | 5 #ifndef CONTENT_CHILD_TEST_REQUEST_PEER_H_ |
| 6 #define CONTENT_CHILD_TEST_REQUEST_PEER_H_ | 6 #define CONTENT_CHILD_TEST_REQUEST_PEER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void OnReceivedResponse(const ResourceResponseInfo& info) override; | 36 void OnReceivedResponse(const ResourceResponseInfo& info) override; |
| 37 void OnDownloadedData(int len, int encoded_data_length) override; | 37 void OnDownloadedData(int len, int encoded_data_length) override; |
| 38 void OnReceivedData(std::unique_ptr<ReceivedData> data) override; | 38 void OnReceivedData(std::unique_ptr<ReceivedData> data) override; |
| 39 void OnTransferSizeUpdated(int transfer_size_diff) override; | 39 void OnTransferSizeUpdated(int transfer_size_diff) override; |
| 40 void OnReceivedCachedMetadata(const char* data, int len) override; | 40 void OnReceivedCachedMetadata(const char* data, int len) override; |
| 41 void OnCompletedRequest(int error_code, | 41 void OnCompletedRequest(int error_code, |
| 42 bool was_ignored_by_handler, | 42 bool was_ignored_by_handler, |
| 43 bool stale_copy_in_cache, | 43 bool stale_copy_in_cache, |
| 44 const base::TimeTicks& completion_time, | 44 const base::TimeTicks& completion_time, |
| 45 int64_t total_transfer_size, | 45 int64_t total_transfer_size, |
| 46 int64_t encoded_body_size) override; | 46 int64_t encoded_body_size, |
| 47 int64_t decoded_body_size) override; |
| 47 | 48 |
| 48 struct Context final { | 49 struct Context final { |
| 49 Context(); | 50 Context(); |
| 50 ~Context(); | 51 ~Context(); |
| 51 | 52 |
| 52 // True if should follow redirects, false if should cancel them. | 53 // True if should follow redirects, false if should cancel them. |
| 53 bool follow_redirects = true; | 54 bool follow_redirects = true; |
| 54 // True if the request should be deferred on redirects. | 55 // True if the request should be deferred on redirects. |
| 55 bool defer_on_redirect = false; | 56 bool defer_on_redirect = false; |
| 56 | 57 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 private: | 82 private: |
| 82 ResourceDispatcher* dispatcher_; | 83 ResourceDispatcher* dispatcher_; |
| 83 Context* context_; | 84 Context* context_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(TestRequestPeer); | 86 DISALLOW_COPY_AND_ASSIGN(TestRequestPeer); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace content | 89 } // namespace content |
| 89 | 90 |
| 90 #endif // CONTENT_CHILD_TEST_REQUEST_PEER_H_ | 91 #endif // CONTENT_CHILD_TEST_REQUEST_PEER_H_ |
| OLD | NEW |