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

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

Issue 2332263002: Updated suborigin serialization to latest spec proposal (Closed)
Patch Set: Convert suborigin schemes to pseudo schemes 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 2663 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 << request_data.url.possibly_invalid_spec(); 2674 << request_data.url.possibly_invalid_spec();
2675 return false; 2675 return false;
2676 } 2676 }
2677 2677
2678 // Check if the renderer is using an illegal Origin header. If so, kill it. 2678 // Check if the renderer is using an illegal Origin header. If so, kill it.
2679 std::string origin_string; 2679 std::string origin_string;
2680 bool has_origin = 2680 bool has_origin =
2681 headers.GetHeader("Origin", &origin_string) && origin_string != "null"; 2681 headers.GetHeader("Origin", &origin_string) && origin_string != "null";
2682 if (has_origin) { 2682 if (has_origin) {
2683 GURL origin(origin_string); 2683 GURL origin(origin_string);
2684 if (!policy->CanCommitURL(child_id, origin)) { 2684 if (!policy->CanSetAsOriginHeader(child_id, origin)) {
2685 VLOG(1) << "Killed renderer for illegal origin: " << origin_string; 2685 VLOG(1) << "Killed renderer for illegal origin: " << origin_string;
2686 bad_message::ReceivedBadMessage(filter, bad_message::RDH_ILLEGAL_ORIGIN); 2686 bad_message::ReceivedBadMessage(filter, bad_message::RDH_ILLEGAL_ORIGIN);
2687 return false; 2687 return false;
2688 } 2688 }
2689 } 2689 }
2690 2690
2691 // Check if the renderer is permitted to upload the requested files. 2691 // Check if the renderer is permitted to upload the requested files.
2692 if (request_data.request_body.get()) { 2692 if (request_data.request_body.get()) {
2693 const std::vector<ResourceRequestBodyImpl::Element>* uploads = 2693 const std::vector<ResourceRequestBodyImpl::Element>* uploads =
2694 request_data.request_body->elements(); 2694 request_data.request_body->elements();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 request_info->GetRouteID(), is_content_initiated, true, &throttles); 2730 request_info->GetRouteID(), is_content_initiated, true, &throttles);
2731 if (!throttles.empty()) { 2731 if (!throttles.empty()) {
2732 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2732 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2733 std::move(throttles))); 2733 std::move(throttles)));
2734 } 2734 }
2735 } 2735 }
2736 return handler; 2736 return handler;
2737 } 2737 }
2738 2738
2739 } // namespace content 2739 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698