| 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // As the unhandled resource message effectively has no consumer, mark it as | 852 // As the unhandled resource message effectively has no consumer, mark it as |
| 853 // handled to prevent needless propagation through the filter pipeline. | 853 // handled to prevent needless propagation through the filter pipeline. |
| 854 handled = true; | 854 handled = true; |
| 855 } | 855 } |
| 856 | 856 |
| 857 filter_ = NULL; | 857 filter_ = NULL; |
| 858 return handled; | 858 return handled; |
| 859 } | 859 } |
| 860 | 860 |
| 861 void ResourceDispatcherHostImpl::OnRequestResource( | 861 void ResourceDispatcherHostImpl::OnRequestResource( |
| 862 const IPC::Message& message, | 862 int routing_id, |
| 863 int request_id, | 863 int request_id, |
| 864 const ResourceHostMsg_Request& request_data) { | 864 const ResourceHostMsg_Request& request_data) { |
| 865 BeginRequest(request_id, request_data, NULL, message.routing_id()); | 865 BeginRequest(request_id, request_data, NULL, routing_id); |
| 866 } | 866 } |
| 867 | 867 |
| 868 // Begins a resource request with the given params on behalf of the specified | 868 // Begins a resource request with the given params on behalf of the specified |
| 869 // child process. Responses will be dispatched through the given receiver. The | 869 // child process. Responses will be dispatched through the given receiver. The |
| 870 // process ID is used to lookup WebContentsImpl from routing_id's in the case of | 870 // process ID is used to lookup WebContentsImpl from routing_id's in the case of |
| 871 // a request from a renderer. request_context is the cookie/cache context to be | 871 // a request from a renderer. request_context is the cookie/cache context to be |
| 872 // used for this request. | 872 // used for this request. |
| 873 // | 873 // |
| 874 // If sync_result is non-null, then a SyncLoad reply will be generated, else | 874 // If sync_result is non-null, then a SyncLoad reply will be generated, else |
| 875 // a normal asynchronous set of response messages will be generated. | 875 // a normal asynchronous set of response messages will be generated. |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1973 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
| 1974 && !policy->CanReadRawCookies(child_id)) { | 1974 && !policy->CanReadRawCookies(child_id)) { |
| 1975 VLOG(1) << "Denied unauthorized request for raw headers"; | 1975 VLOG(1) << "Denied unauthorized request for raw headers"; |
| 1976 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1976 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
| 1977 } | 1977 } |
| 1978 | 1978 |
| 1979 return load_flags; | 1979 return load_flags; |
| 1980 } | 1980 } |
| 1981 | 1981 |
| 1982 } // namespace content | 1982 } // namespace content |
| OLD | NEW |