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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2332263002: Updated suborigin serialization to latest spec proposal (Closed)
Patch Set: Actually disable test Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (pending_frame_host) 408 if (pending_frame_host)
409 routing_ids->insert(pending_frame_host->GetGlobalFrameRoutingId()); 409 routing_ids->insert(pending_frame_host->GetGlobalFrameRoutingId());
410 } 410 }
411 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 411 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
412 base::Bind(&NotifyForRouteSetOnIO, frame_callback, 412 base::Bind(&NotifyForRouteSetOnIO, frame_callback,
413 base::Passed(std::move(routing_ids)))); 413 base::Passed(std::move(routing_ids))));
414 } 414 }
415 415
416 } // namespace 416 } // namespace
417 417
418
419 ResourceDispatcherHostImpl::LoadInfo::LoadInfo() {} 418 ResourceDispatcherHostImpl::LoadInfo::LoadInfo() {}
420 ResourceDispatcherHostImpl::LoadInfo::LoadInfo(const LoadInfo& other) = default; 419 ResourceDispatcherHostImpl::LoadInfo::LoadInfo(const LoadInfo& other) = default;
421 ResourceDispatcherHostImpl::LoadInfo::~LoadInfo() {} 420 ResourceDispatcherHostImpl::LoadInfo::~LoadInfo() {}
422 421
423 ResourceDispatcherHostImpl::HeaderInterceptorInfo::HeaderInterceptorInfo() {} 422 ResourceDispatcherHostImpl::HeaderInterceptorInfo::HeaderInterceptorInfo() {}
424 423
425 ResourceDispatcherHostImpl::HeaderInterceptorInfo::~HeaderInterceptorInfo() {} 424 ResourceDispatcherHostImpl::HeaderInterceptorInfo::~HeaderInterceptorInfo() {}
426 425
427 ResourceDispatcherHostImpl::HeaderInterceptorInfo::HeaderInterceptorInfo( 426 ResourceDispatcherHostImpl::HeaderInterceptorInfo::HeaderInterceptorInfo(
428 const HeaderInterceptorInfo& other) {} 427 const HeaderInterceptorInfo& other) {}
(...skipping 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 << request_data.url.possibly_invalid_spec(); 2664 << request_data.url.possibly_invalid_spec();
2666 return false; 2665 return false;
2667 } 2666 }
2668 2667
2669 // Check if the renderer is using an illegal Origin header. If so, kill it. 2668 // Check if the renderer is using an illegal Origin header. If so, kill it.
2670 std::string origin_string; 2669 std::string origin_string;
2671 bool has_origin = 2670 bool has_origin =
2672 headers.GetHeader("Origin", &origin_string) && origin_string != "null"; 2671 headers.GetHeader("Origin", &origin_string) && origin_string != "null";
2673 if (has_origin) { 2672 if (has_origin) {
2674 GURL origin(origin_string); 2673 GURL origin(origin_string);
2675 if (!policy->CanCommitURL(child_id, origin)) { 2674 if (!policy->CanSetAsOriginHeader(child_id, origin)) {
2676 VLOG(1) << "Killed renderer for illegal origin: " << origin_string; 2675 VLOG(1) << "Killed renderer for illegal origin: " << origin_string;
2677 bad_message::ReceivedBadMessage(filter, bad_message::RDH_ILLEGAL_ORIGIN); 2676 bad_message::ReceivedBadMessage(filter, bad_message::RDH_ILLEGAL_ORIGIN);
2678 return false; 2677 return false;
2679 } 2678 }
2680 } 2679 }
2681 2680
2682 // Check if the renderer is permitted to upload the requested files. 2681 // Check if the renderer is permitted to upload the requested files.
2683 if (request_data.request_body.get()) { 2682 if (request_data.request_body.get()) {
2684 const std::vector<ResourceRequestBodyImpl::Element>* uploads = 2683 const std::vector<ResourceRequestBodyImpl::Element>* uploads =
2685 request_data.request_body->elements(); 2684 request_data.request_body->elements();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 &throttles); 2720 &throttles);
2722 if (!throttles.empty()) { 2721 if (!throttles.empty()) {
2723 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2722 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2724 std::move(throttles))); 2723 std::move(throttles)));
2725 } 2724 }
2726 } 2725 }
2727 return handler; 2726 return handler;
2728 } 2727 }
2729 2728
2730 } // namespace content 2729 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_unittest.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698