yhirano | 20c94ea9b | 2016-05-18 05:20:45 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CONTENT_COMMON_RESOURCE_REQUEST_COMPLETION_STATUS_H_ |
| 6 | #define CONTENT_COMMON_RESOURCE_REQUEST_COMPLETION_STATUS_H_ |
| 7 | |
| 8 | #include <stdint.h> |
| 9 | #include <string> |
| 10 | |
| 11 | #include "base/time/time.h" |
| 12 | #include "content/common/content_export.h" |
| 13 | |
| 14 | namespace content { |
| 15 | |
| 16 | struct CONTENT_EXPORT ResourceRequestCompletionStatus { |
| 17 | ResourceRequestCompletionStatus(); |
| 18 | ResourceRequestCompletionStatus( |
| 19 | const ResourceRequestCompletionStatus& status); |
| 20 | ~ResourceRequestCompletionStatus(); |
| 21 | |
| 22 | // The error code. |
| 23 | int error_code = 0; |
| 24 | |
| 25 | // Was ignored by the request handler. |
| 26 | bool was_ignored_by_handler = false; |
| 27 | |
| 28 | // A copy of the data requested exists in the cache. |
| 29 | bool exists_in_cache = false; |
| 30 | |
yhirano | 20c94ea9b | 2016-05-18 05:20:45 | [diff] [blame] | 31 | // Time the request completed. |
| 32 | base::TimeTicks completion_time; |
| 33 | |
| 34 | // Total amount of data received from the network. |
| 35 | int64_t encoded_data_length = 0; |
yhirano | efb9d78 | 2016-11-28 09:29:03 | [diff] [blame] | 36 | |
| 37 | // The length of the response body before removing any content encodings. |
| 38 | int64_t encoded_body_length = 0; |
horo | e8442e6 | 2017-04-27 19:10:48 | [diff] [blame^] | 39 | |
| 40 | // The length of the response body after decoding. |
| 41 | int64_t decoded_body_length = 0; |
yhirano | 20c94ea9b | 2016-05-18 05:20:45 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | } // namespace content |
| 45 | |
| 46 | #endif // CONTENT_COMMON_RESOURCE_REQUEST_COMPLETION_STATUS_H_ |