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

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

Issue 2908593002: Fix Docs links from Files app on ChromeOS not working with PlzNavigate. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | 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) 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 ResourceContext* resource_context = NULL; 1141 ResourceContext* resource_context = NULL;
1142 net::URLRequestContext* request_context = NULL; 1142 net::URLRequestContext* request_context = NULL;
1143 requester_info->GetContexts(request_data.resource_type, &resource_context, 1143 requester_info->GetContexts(request_data.resource_type, &resource_context,
1144 &request_context); 1144 &request_context);
1145 1145
1146 // Parse the headers before calling ShouldServiceRequest, so that they are 1146 // Parse the headers before calling ShouldServiceRequest, so that they are
1147 // available to be validated. 1147 // available to be validated.
1148 net::HttpRequestHeaders headers; 1148 net::HttpRequestHeaders headers;
1149 headers.AddHeadersFromString(request_data.headers); 1149 headers.AddHeadersFromString(request_data.headers);
1150 1150
1151 // PlzNavigate: no need to check ShouldServiceRequest at this point. The
1152 // browser process already picked the right renderer for the final URL, and
1153 // the stream URL is unguessable.
1151 if (is_shutdown_ || 1154 if (is_shutdown_ ||
1152 !ShouldServiceRequest(child_id, request_data, headers, requester_info, 1155 (!is_navigation_stream_request &&
Charlie Reis 2017/05/25 21:28:53 Why are we turning off a security check rather tha
jam 2017/05/25 21:45:17 To be clear: this isn't skipped for "blob urls". T
jam 2017/05/25 21:47:57 also: once we use mojo for loading, and consequent
jam 2017/05/25 22:00:41 Sorry forgot to reply to this: I think in this exa
Charlie Reis 2017/05/25 23:11:01 Interesting. Then I'm confused about why the requ
1153 resource_context)) { 1156 !ShouldServiceRequest(child_id, request_data, headers, requester_info,
1157 resource_context))) {
1154 AbortRequestBeforeItStarts(requester_info->filter(), sync_result_handler, 1158 AbortRequestBeforeItStarts(requester_info->filter(), sync_result_handler,
1155 request_id, std::move(url_loader_client)); 1159 request_id, std::move(url_loader_client));
1156 return; 1160 return;
1157 } 1161 }
1158 // Check if we have a registered interceptor for the headers passed in. If 1162 // Check if we have a registered interceptor for the headers passed in. If
1159 // yes then we need to mark the current request as pending and wait for the 1163 // yes then we need to mark the current request as pending and wait for the
1160 // interceptor to invoke the callback with a status code indicating whether 1164 // interceptor to invoke the callback with a status code indicating whether
1161 // the request needs to be aborted or continued. 1165 // the request needs to be aborted or continued.
1162 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext();) { 1166 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext();) {
1163 HeaderInterceptorMap::iterator index = 1167 HeaderInterceptorMap::iterator index =
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2676 &throttles); 2680 &throttles);
2677 if (!throttles.empty()) { 2681 if (!throttles.empty()) {
2678 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2682 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2679 std::move(throttles))); 2683 std::move(throttles)));
2680 } 2684 }
2681 } 2685 }
2682 return handler; 2686 return handler;
2683 } 2687 }
2684 2688
2685 } // namespace content 2689 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698