| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/resource_dispatcher.h" | 7 #include "content/common/resource_dispatcher.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 request_.headers = request_info.headers; | 87 request_.headers = request_info.headers; |
| 88 request_.load_flags = request_info.load_flags; | 88 request_.load_flags = request_info.load_flags; |
| 89 request_.origin_pid = request_info.requestor_pid; | 89 request_.origin_pid = request_info.requestor_pid; |
| 90 request_.resource_type = request_info.request_type; | 90 request_.resource_type = request_info.request_type; |
| 91 request_.request_context = request_info.request_context; | 91 request_.request_context = request_info.request_context; |
| 92 request_.appcache_host_id = request_info.appcache_host_id; | 92 request_.appcache_host_id = request_info.appcache_host_id; |
| 93 request_.download_to_file = request_info.download_to_file; | 93 request_.download_to_file = request_info.download_to_file; |
| 94 request_.has_user_gesture = request_info.has_user_gesture; | 94 request_.has_user_gesture = request_info.has_user_gesture; |
| 95 request_.is_main_frame = request_info.is_main_frame; | 95 request_.is_main_frame = request_info.is_main_frame; |
| 96 request_.frame_id = request_info.frame_id; | 96 request_.frame_id = request_info.frame_id; |
| 97 request_.transition_type = request_info.transition_type; |
| 97 } | 98 } |
| 98 | 99 |
| 99 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { | 100 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { |
| 100 // we remove our hook for the resource dispatcher only when going away, since | 101 // we remove our hook for the resource dispatcher only when going away, since |
| 101 // it doesn't keep track of whether we've force terminated the request | 102 // it doesn't keep track of whether we've force terminated the request |
| 102 if (request_id_ >= 0) { | 103 if (request_id_ >= 0) { |
| 103 // this operation may fail, as the dispatcher will have preemptively | 104 // this operation may fail, as the dispatcher will have preemptively |
| 104 // removed us when the renderer sends the ReceivedAllData message. | 105 // removed us when the renderer sends the ReceivedAllData message. |
| 105 dispatcher_->RemovePendingRequest(request_id_); | 106 dispatcher_->RemovePendingRequest(request_id_); |
| 106 | 107 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 585 |
| 585 // static | 586 // static |
| 586 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 587 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
| 587 while (!queue->empty()) { | 588 while (!queue->empty()) { |
| 588 IPC::Message* message = queue->front(); | 589 IPC::Message* message = queue->front(); |
| 589 ReleaseResourcesInDataMessage(*message); | 590 ReleaseResourcesInDataMessage(*message); |
| 590 queue->pop_front(); | 591 queue->pop_front(); |
| 591 delete message; | 592 delete message; |
| 592 } | 593 } |
| 593 } | 594 } |
| OLD | NEW |