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

Side by Side Diff: content/renderer/pepper/pepper_url_loader_host.cc

Issue 23548008: Don't set the request target type to object when navigating from a Pepper plug-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | content/renderer/pepper/url_request_info_util.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/pepper/pepper_url_loader_host.h" 5 #include "content/renderer/pepper/pepper_url_loader_host.h"
6 6
7 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 7 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
8 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 8 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
9 #include "content/renderer/pepper/url_request_info_util.h" 9 #include "content/renderer/pepper/url_request_info_util.h"
10 #include "content/renderer/pepper/url_response_info_util.h" 10 #include "content/renderer/pepper/url_response_info_util.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 " PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS."); 242 " PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS.");
243 return PP_ERROR_NOACCESS; 243 return PP_ERROR_NOACCESS;
244 } 244 }
245 245
246 if (loader_.get()) 246 if (loader_.get())
247 return PP_ERROR_INPROGRESS; 247 return PP_ERROR_INPROGRESS;
248 248
249 WebFrame* frame = GetFrame(); 249 WebFrame* frame = GetFrame();
250 if (!frame) 250 if (!frame)
251 return PP_ERROR_FAILED; 251 return PP_ERROR_FAILED;
252
252 WebURLRequest web_request; 253 WebURLRequest web_request;
253 if (!CreateWebURLRequest(&filled_in_request_data, frame, &web_request)) 254 if (!CreateWebURLRequest(&filled_in_request_data, frame, &web_request))
254 return PP_ERROR_FAILED; 255 return PP_ERROR_FAILED;
256
257 web_request.setTargetType(WebURLRequest::TargetIsObject);
255 web_request.setRequestorProcessID(renderer_ppapi_host_->GetPluginPID()); 258 web_request.setRequestorProcessID(renderer_ppapi_host_->GetPluginPID());
256 259
257 WebURLLoaderOptions options; 260 WebURLLoaderOptions options;
258 if (has_universal_access_) { 261 if (has_universal_access_) {
259 options.allowCredentials = true; 262 options.allowCredentials = true;
260 options.crossOriginRequestPolicy = 263 options.crossOriginRequestPolicy =
261 WebURLLoaderOptions::CrossOriginRequestPolicyAllow; 264 WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
262 } else { 265 } else {
263 // All other HTTP requests are untrusted. 266 // All other HTTP requests are untrusted.
264 options.untrustedHTTP = true; 267 options.untrustedHTTP = true;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 ppapi::proxy::ResourceMessageReplyParams params; 416 ppapi::proxy::ResourceMessageReplyParams params;
414 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress( 417 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress(
415 record_upload ? bytes_sent_ : -1, 418 record_upload ? bytes_sent_ : -1,
416 record_upload ? total_bytes_to_be_sent_ : -1, 419 record_upload ? total_bytes_to_be_sent_ : -1,
417 record_download ? bytes_received_ : -1, 420 record_download ? bytes_received_ : -1,
418 record_download ? total_bytes_to_be_received_ : -1)); 421 record_download ? total_bytes_to_be_received_ : -1));
419 } 422 }
420 } 423 }
421 424
422 } // namespace content 425 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/url_request_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698