OLD | NEW |
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 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 | 1858 |
1859 if (is_shutdown_ || | 1859 if (is_shutdown_ || |
1860 // TODO(davidben): Check ShouldServiceRequest here. This is important; it | 1860 // TODO(davidben): Check ShouldServiceRequest here. This is important; it |
1861 // needs to be checked relative to the child that /requested/ the | 1861 // needs to be checked relative to the child that /requested/ the |
1862 // navigation. It's where file upload checks, etc., come in. | 1862 // navigation. It's where file upload checks, etc., come in. |
1863 (delegate_ && !delegate_->ShouldBeginRequest( | 1863 (delegate_ && !delegate_->ShouldBeginRequest( |
1864 info.begin_params.method, | 1864 info.begin_params.method, |
1865 info.common_params.url, | 1865 info.common_params.url, |
1866 resource_type, | 1866 resource_type, |
1867 resource_context))) { | 1867 resource_context))) { |
1868 loader->NotifyRequestFailed(net::ERR_ABORTED); | 1868 loader->NotifyRequestFailed(false, net::ERR_ABORTED); |
1869 return; | 1869 return; |
1870 } | 1870 } |
1871 | 1871 |
1872 // Save the URL on the stack to help catch URLRequests which outlive their | 1872 // Save the URL on the stack to help catch URLRequests which outlive their |
1873 // URLRequestContexts. See https://crbug.com/90971 | 1873 // URLRequestContexts. See https://crbug.com/90971 |
1874 char url_buf[128]; | 1874 char url_buf[128]; |
1875 base::strlcpy( | 1875 base::strlcpy( |
1876 url_buf, info.common_params.url.spec().c_str(), arraysize(url_buf)); | 1876 url_buf, info.common_params.url.spec().c_str(), arraysize(url_buf)); |
1877 base::debug::Alias(url_buf); | 1877 base::debug::Alias(url_buf); |
1878 CHECK(ContainsKey(active_resource_contexts_, resource_context)); | 1878 CHECK(ContainsKey(active_resource_contexts_, resource_context)); |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 | 2344 |
2345 // Add a flag to selectively bypass the data reduction proxy if the resource | 2345 // Add a flag to selectively bypass the data reduction proxy if the resource |
2346 // type is not an image. | 2346 // type is not an image. |
2347 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2347 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
2348 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2348 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
2349 | 2349 |
2350 return load_flags; | 2350 return load_flags; |
2351 } | 2351 } |
2352 | 2352 |
2353 } // namespace content | 2353 } // namespace content |
OLD | NEW |