OLD | NEW |
| (Empty) |
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 explicit ResourceRequestCompletionStatus(int64_t length); | |
21 // Sets error_code to net::OK, completition_time to base::TimeTicks::Now(), | |
22 // and encoded_data_length = encoded_body_length = |length|; | |
23 ~ResourceRequestCompletionStatus(); | |
24 | |
25 // The error code. | |
26 int error_code = 0; | |
27 | |
28 // Was ignored by the request handler. | |
29 bool was_ignored_by_handler = false; | |
30 | |
31 // A copy of the data requested exists in the cache. | |
32 bool exists_in_cache = false; | |
33 | |
34 // Time the request completed. | |
35 base::TimeTicks completion_time; | |
36 | |
37 // Total amount of data received from the network. | |
38 int64_t encoded_data_length = 0; | |
39 | |
40 // The length of the response body before removing any content encodings. | |
41 int64_t encoded_body_length = 0; | |
42 | |
43 // The length of the response body after decoding. | |
44 int64_t decoded_body_length = 0; | |
45 }; | |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_COMMON_RESOURCE_REQUEST_COMPLETION_STATUS_H_ | |
OLD | NEW |