Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: ppapi/shared_impl/url_request_info_data.cc

Issue 10913257: Convert url request info to new proxy API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/url_request_info_data.h ('k') | ppapi/thunk/ppb_flash_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "ppapi/shared_impl/url_request_info_data.h"
6
7 #include "ppapi/shared_impl/resource.h"
8
9 namespace ppapi {
10
11 namespace {
12
13 const int32_t kDefaultPrefetchBufferUpperThreshold = 100 * 1000 * 1000;
14 const int32_t kDefaultPrefetchBufferLowerThreshold = 50 * 1000 * 1000;
15
16 } // namespace
17
18 URLRequestInfoData::BodyItem::BodyItem()
19 : is_file(false),
20 start_offset(0),
21 number_of_bytes(-1),
22 expected_last_modified_time(0.0) {
23 }
24
25 URLRequestInfoData::BodyItem::BodyItem(const std::string& data)
26 : is_file(false),
27 data(data),
28 start_offset(0),
29 number_of_bytes(-1),
30 expected_last_modified_time(0.0) {
31 }
32
33 URLRequestInfoData::BodyItem::BodyItem(
34 Resource* file_ref,
35 int64_t start_offset,
36 int64_t number_of_bytes,
37 PP_Time expected_last_modified_time)
38 : is_file(true),
39 file_ref(file_ref),
40 file_ref_host_resource(file_ref->host_resource()),
41 start_offset(start_offset),
42 number_of_bytes(number_of_bytes),
43 expected_last_modified_time(expected_last_modified_time) {
44 }
45
46 URLRequestInfoData::URLRequestInfoData()
47 : url(),
48 method(),
49 headers(),
50 stream_to_file(false),
51 follow_redirects(true),
52 record_download_progress(false),
53 record_upload_progress(false),
54 has_custom_referrer_url(false),
55 custom_referrer_url(),
56 allow_cross_origin_requests(false),
57 allow_credentials(false),
58 has_custom_content_transfer_encoding(false),
59 custom_content_transfer_encoding(),
60 has_custom_user_agent(false),
61 custom_user_agent(),
62 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold),
63 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold),
64 body() {
65 }
66
67 URLRequestInfoData::~URLRequestInfoData() {
68 }
69
70 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/url_request_info_data.h ('k') | ppapi/thunk/ppb_flash_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698