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

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

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Updated test Created 5 years, 8 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 <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 1859
1860 if (is_shutdown_ || 1860 if (is_shutdown_ ||
1861 // TODO(davidben): Check ShouldServiceRequest here. This is important; it 1861 // TODO(davidben): Check ShouldServiceRequest here. This is important; it
1862 // needs to be checked relative to the child that /requested/ the 1862 // needs to be checked relative to the child that /requested/ the
1863 // navigation. It's where file upload checks, etc., come in. 1863 // navigation. It's where file upload checks, etc., come in.
1864 (delegate_ && !delegate_->ShouldBeginRequest( 1864 (delegate_ && !delegate_->ShouldBeginRequest(
1865 info.begin_params.method, 1865 info.begin_params.method,
1866 info.common_params.url, 1866 info.common_params.url,
1867 resource_type, 1867 resource_type,
1868 resource_context))) { 1868 resource_context))) {
1869 loader->NotifyRequestFailed(net::ERR_ABORTED); 1869 loader->NotifyRequestFailed(false, net::ERR_ABORTED);
1870 return; 1870 return;
1871 } 1871 }
1872 1872
1873 // Save the URL on the stack to help catch URLRequests which outlive their 1873 // Save the URL on the stack to help catch URLRequests which outlive their
1874 // URLRequestContexts. See https://crbug.com/90971 1874 // URLRequestContexts. See https://crbug.com/90971
1875 char url_buf[128]; 1875 char url_buf[128];
1876 base::strlcpy( 1876 base::strlcpy(
1877 url_buf, info.common_params.url.spec().c_str(), arraysize(url_buf)); 1877 url_buf, info.common_params.url.spec().c_str(), arraysize(url_buf));
1878 base::debug::Alias(url_buf); 1878 base::debug::Alias(url_buf);
1879 CHECK(ContainsKey(active_resource_contexts_, resource_context)); 1879 CHECK(ContainsKey(active_resource_contexts_, resource_context));
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 2345
2346 // Add a flag to selectively bypass the data reduction proxy if the resource 2346 // Add a flag to selectively bypass the data reduction proxy if the resource
2347 // type is not an image. 2347 // type is not an image.
2348 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2348 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2349 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2349 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2350 2350
2351 return load_flags; 2351 return load_flags;
2352 } 2352 }
2353 2353
2354 } // namespace content 2354 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698