Home | History | Annotate | Download | only in pepper

Lines Matching refs:data

84 // Checks that the request data is valid. Returns false on failure. Note that
87 bool ValidateURLRequestData(const ppapi::URLRequestInfoData& data) {
88 if (data.prefetch_buffer_lower_threshold < 0 ||
89 data.prefetch_buffer_upper_threshold < 0 ||
90 data.prefetch_buffer_upper_threshold <=
91 data.prefetch_buffer_lower_threshold) {
97 // Ensures that the file_ref members of the given request info data are
99 bool EnsureFileRefObjectsPopulated(ppapi::URLRequestInfoData* data) {
102 for (size_t i = 0; i < data->body.size(); ++i) {
103 URLRequestInfoData::BodyItem& item = data->body[i];
117 bool CreateWebURLRequest(ppapi::URLRequestInfoData* data,
123 if (!ValidateURLRequestData(*data) || !EnsureFileRefObjectsPopulated(data))
128 data->url)));
129 dest->setDownloadToFile(data->stream_to_file);
130 dest->setReportUploadProgress(data->record_upload_progress);
132 if (!data->method.empty())
133 dest->setHTTPMethod(WebString::fromUTF8(data->method));
137 const std::string& headers = data->headers;
147 // Append the upload data.
148 if (!data->body.empty()) {
151 for (size_t i = 0; i < data->body.size(); ++i) {
152 const URLRequestInfoData::BodyItem& item = data->body[i];
161 DCHECK(!item.data.empty());
162 http_body.appendData(WebData(item.data));
171 if (data->has_custom_referrer_url && !data->custom_referrer_url.empty())
172 frame->setReferrerForRequest(*dest, GURL(data->custom_referrer_url));
174 if (data->has_custom_content_transfer_encoding &&
175 !data->custom_content_transfer_encoding.empty()) {
178 WebString::fromUTF8(data->custom_content_transfer_encoding));
181 if (data->has_custom_user_agent) {
185 WebString::fromUTF8(data->custom_user_agent),
192 bool URLRequestRequiresUniversalAccess(const ppapi::URLRequestInfoData& data) {
194 data.has_custom_referrer_url ||
195 data.has_custom_content_transfer_encoding ||
196 data.has_custom_user_agent ||
197 url_util::FindAndCompareScheme(data.url, "javascript", NULL);