OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ppapi/shared_impl/url_request_info_data.h" | 5 #include "ppapi/shared_impl/url_request_info_data.h" |
6 | 6 |
7 #include "ppapi/shared_impl/resource.h" | 7 #include "ppapi/shared_impl/resource.h" |
8 | 8 |
9 namespace ppapi { | 9 namespace ppapi { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 const int32_t kDefaultPrefetchBufferUpperThreshold = 100 * 1000 * 1000; | 13 const int32_t kDefaultPrefetchBufferUpperThreshold = 100 * 1000 * 1000; |
14 const int32_t kDefaultPrefetchBufferLowerThreshold = 50 * 1000 * 1000; | 14 const int32_t kDefaultPrefetchBufferLowerThreshold = 50 * 1000 * 1000; |
15 | 15 |
16 } // namespace | 16 } // namespace |
17 | 17 |
18 URLRequestInfoData::BodyItem::BodyItem() | 18 URLRequestInfoData::BodyItem::BodyItem() |
19 : is_file(false), | 19 : is_file(false), |
| 20 file_ref_pp_resource(0), |
20 start_offset(0), | 21 start_offset(0), |
21 number_of_bytes(-1), | 22 number_of_bytes(-1), |
22 expected_last_modified_time(0.0) { | 23 expected_last_modified_time(0.0) { |
23 } | 24 } |
24 | 25 |
25 URLRequestInfoData::BodyItem::BodyItem(const std::string& data) | 26 URLRequestInfoData::BodyItem::BodyItem(const std::string& data) |
26 : is_file(false), | 27 : is_file(false), |
27 data(data), | 28 data(data), |
| 29 file_ref_pp_resource(0), |
28 start_offset(0), | 30 start_offset(0), |
29 number_of_bytes(-1), | 31 number_of_bytes(-1), |
30 expected_last_modified_time(0.0) { | 32 expected_last_modified_time(0.0) { |
31 } | 33 } |
32 | 34 |
33 URLRequestInfoData::BodyItem::BodyItem( | 35 URLRequestInfoData::BodyItem::BodyItem( |
34 Resource* file_ref, | 36 Resource* file_ref, |
35 int64_t start_offset, | 37 int64_t start_offset, |
36 int64_t number_of_bytes, | 38 int64_t number_of_bytes, |
37 PP_Time expected_last_modified_time) | 39 PP_Time expected_last_modified_time) |
38 : is_file(true), | 40 : is_file(true), |
39 file_ref(file_ref), | 41 file_ref_resource(file_ref), |
40 file_ref_host_resource(file_ref->host_resource()), | 42 file_ref_pp_resource(file_ref->pp_resource()), |
41 start_offset(start_offset), | 43 start_offset(start_offset), |
42 number_of_bytes(number_of_bytes), | 44 number_of_bytes(number_of_bytes), |
43 expected_last_modified_time(expected_last_modified_time) { | 45 expected_last_modified_time(expected_last_modified_time) { |
44 } | 46 } |
45 | 47 |
46 URLRequestInfoData::URLRequestInfoData() | 48 URLRequestInfoData::URLRequestInfoData() |
47 : url(), | 49 : url(), |
48 method(), | 50 method(), |
49 headers(), | 51 headers(), |
50 stream_to_file(false), | 52 stream_to_file(false), |
(...skipping 10 matching lines...) Expand all Loading... |
61 custom_user_agent(), | 63 custom_user_agent(), |
62 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold), | 64 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold), |
63 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold), | 65 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold), |
64 body() { | 66 body() { |
65 } | 67 } |
66 | 68 |
67 URLRequestInfoData::~URLRequestInfoData() { | 69 URLRequestInfoData::~URLRequestInfoData() { |
68 } | 70 } |
69 | 71 |
70 } // namespace ppapi | 72 } // namespace ppapi |
OLD | NEW |