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
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/url_request_info_data.h"
7 #include "ppapi/shared_impl/resource.h"
13 const int32_t kDefaultPrefetchBufferUpperThreshold
= 100 * 1000 * 1000;
14 const int32_t kDefaultPrefetchBufferLowerThreshold
= 50 * 1000 * 1000;
18 URLRequestInfoData::BodyItem::BodyItem()
20 file_ref_pp_resource(0),
23 expected_last_modified_time(0.0) {}
25 URLRequestInfoData::BodyItem::BodyItem(const std::string
& data
)
28 file_ref_pp_resource(0),
31 expected_last_modified_time(0.0) {}
33 URLRequestInfoData::BodyItem::BodyItem(Resource
* file_ref
,
35 int64_t number_of_bytes
,
36 PP_Time expected_last_modified_time
)
38 file_ref_resource(file_ref
),
39 file_ref_pp_resource(file_ref
->pp_resource()),
40 start_offset(start_offset
),
41 number_of_bytes(number_of_bytes
),
42 expected_last_modified_time(expected_last_modified_time
) {}
44 URLRequestInfoData::URLRequestInfoData()
48 stream_to_file(false),
49 follow_redirects(true),
50 record_download_progress(false),
51 record_upload_progress(false),
52 has_custom_referrer_url(false),
53 custom_referrer_url(),
54 allow_cross_origin_requests(false),
55 allow_credentials(false),
56 has_custom_content_transfer_encoding(false),
57 custom_content_transfer_encoding(),
58 has_custom_user_agent(false),
60 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold
),
61 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold
),
64 URLRequestInfoData::~URLRequestInfoData() {}