| 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/child/resource_dispatcher.h" | 7 #include "content/child/resource_dispatcher.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 request_.allow_download = extra_data->allow_download(); | 144 request_.allow_download = extra_data->allow_download(); |
| 145 request_.transition_type = extra_data->transition_type(); | 145 request_.transition_type = extra_data->transition_type(); |
| 146 request_.should_replace_current_entry = | 146 request_.should_replace_current_entry = |
| 147 extra_data->should_replace_current_entry(); | 147 extra_data->should_replace_current_entry(); |
| 148 request_.transferred_request_child_id = | 148 request_.transferred_request_child_id = |
| 149 extra_data->transferred_request_child_id(); | 149 extra_data->transferred_request_child_id(); |
| 150 request_.transferred_request_request_id = | 150 request_.transferred_request_request_id = |
| 151 extra_data->transferred_request_request_id(); | 151 extra_data->transferred_request_request_id(); |
| 152 request_.service_worker_provider_id = | 152 request_.service_worker_provider_id = |
| 153 extra_data->service_worker_provider_id(); | 153 extra_data->service_worker_provider_id(); |
| 154 request_.skip_service_worker = extra_data->skip_service_worker(); |
| 154 frame_origin_ = extra_data->frame_origin(); | 155 frame_origin_ = extra_data->frame_origin(); |
| 155 } | 156 } |
| 156 | 157 |
| 157 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { | 158 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { |
| 158 // we remove our hook for the resource dispatcher only when going away, since | 159 // we remove our hook for the resource dispatcher only when going away, since |
| 159 // it doesn't keep track of whether we've force terminated the request | 160 // it doesn't keep track of whether we've force terminated the request |
| 160 if (request_id_ >= 0) { | 161 if (request_id_ >= 0) { |
| 161 // this operation may fail, as the dispatcher will have preemptively | 162 // this operation may fail, as the dispatcher will have preemptively |
| 162 // removed us when the renderer sends the ReceivedAllData message. | 163 // removed us when the renderer sends the ReceivedAllData message. |
| 163 dispatcher_->RemovePendingRequest(request_id_); | 164 dispatcher_->RemovePendingRequest(request_id_); |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 877 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
| 877 while (!queue->empty()) { | 878 while (!queue->empty()) { |
| 878 IPC::Message* message = queue->front(); | 879 IPC::Message* message = queue->front(); |
| 879 ReleaseResourcesInDataMessage(*message); | 880 ReleaseResourcesInDataMessage(*message); |
| 880 queue->pop_front(); | 881 queue->pop_front(); |
| 881 delete message; | 882 delete message; |
| 882 } | 883 } |
| 883 } | 884 } |
| 884 | 885 |
| 885 } // namespace content | 886 } // namespace content |
| OLD | NEW |