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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 6592071: Pepper/Flapper: Add an interface to do sync file ops on FileRefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/renderer
Patch Set: oops, forgot one Created 9 years, 9 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 | « webkit/plugins/ppapi/ppb_flash_file_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/http/http_util.h" 10 #include "net/http/http_util.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 number_of_bytes, 271 number_of_bytes,
272 expected_last_modified_time)); 272 expected_last_modified_time));
273 return true; 273 return true;
274 } 274 }
275 275
276 WebURLRequest PPB_URLRequestInfo_Impl::ToWebURLRequest(WebFrame* frame) const { 276 WebURLRequest PPB_URLRequestInfo_Impl::ToWebURLRequest(WebFrame* frame) const {
277 WebURLRequest web_request; 277 WebURLRequest web_request;
278 web_request.initialize(); 278 web_request.initialize();
279 web_request.setURL(frame->document().completeURL(WebString::fromUTF8(url_))); 279 web_request.setURL(frame->document().completeURL(WebString::fromUTF8(url_)));
280 web_request.setDownloadToFile(stream_to_file_); 280 web_request.setDownloadToFile(stream_to_file_);
281 web_request.setReportUploadProgress(record_upload_progress());
281 282
282 if (!method_.empty()) 283 if (!method_.empty())
283 web_request.setHTTPMethod(WebString::fromUTF8(method_)); 284 web_request.setHTTPMethod(WebString::fromUTF8(method_));
284 285
285 if (!headers_.empty()) { 286 if (!headers_.empty()) {
286 net::HttpUtil::HeadersIterator it(headers_.begin(), headers_.end(), "\n"); 287 net::HttpUtil::HeadersIterator it(headers_.begin(), headers_.end(), "\n");
287 while (it.GetNext()) { 288 while (it.GetNext()) {
288 web_request.addHTTPHeaderField( 289 web_request.addHTTPHeaderField(
289 WebString::fromUTF8(it.name()), 290 WebString::fromUTF8(it.name()),
290 WebString::fromUTF8(it.values())); 291 WebString::fromUTF8(it.values()));
(...skipping 19 matching lines...) Expand all
310 web_request.setHTTPBody(http_body); 311 web_request.setHTTPBody(http_body);
311 } 312 }
312 313
313 frame->setReferrerForRequest(web_request, WebURL()); // Use default. 314 frame->setReferrerForRequest(web_request, WebURL()); // Use default.
314 return web_request; 315 return web_request;
315 } 316 }
316 317
317 } // namespace ppapi 318 } // namespace ppapi
318 } // namespace webkit 319 } // namespace webkit
319 320
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_flash_file_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698