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

Side by Side Diff: chrome/common/resource_dispatcher.cc

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)
Patch Set: Moving extension methods out of download_util.h Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/common/resource_dispatcher.h" 7 #include "chrome/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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 request_.referrer = request_info.referrer; 104 request_.referrer = request_info.referrer;
105 request_.frame_origin = request_info.frame_origin; 105 request_.frame_origin = request_info.frame_origin;
106 request_.main_frame_origin = request_info.main_frame_origin; 106 request_.main_frame_origin = request_info.main_frame_origin;
107 request_.headers = request_info.headers; 107 request_.headers = request_info.headers;
108 request_.load_flags = request_info.load_flags; 108 request_.load_flags = request_info.load_flags;
109 request_.origin_child_id = request_info.requestor_pid; 109 request_.origin_child_id = request_info.requestor_pid;
110 request_.resource_type = request_info.request_type; 110 request_.resource_type = request_info.request_type;
111 request_.request_context = request_info.request_context; 111 request_.request_context = request_info.request_context;
112 request_.appcache_host_id = request_info.appcache_host_id; 112 request_.appcache_host_id = request_info.appcache_host_id;
113 request_.download_to_file = request_info.download_to_file; 113 request_.download_to_file = request_info.download_to_file;
114 request_.has_user_gesture = request_info.has_user_gesture;
114 request_.host_renderer_id = host_renderer_id_; 115 request_.host_renderer_id = host_renderer_id_;
115 request_.host_render_view_id = host_render_view_id_; 116 request_.host_render_view_id = host_render_view_id_;
116 } 117 }
117 118
118 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { 119 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
119 // we remove our hook for the resource dispatcher only when going away, since 120 // we remove our hook for the resource dispatcher only when going away, since
120 // it doesn't keep track of whether we've force terminated the request 121 // it doesn't keep track of whether we've force terminated the request
121 if (request_id_ >= 0) { 122 if (request_id_ >= 0) {
122 // this operation may fail, as the dispatcher will have preemptively 123 // this operation may fail, as the dispatcher will have preemptively
123 // removed us when the renderer sends the ReceivedAllData message. 124 // removed us when the renderer sends the ReceivedAllData message.
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 594
594 // static 595 // static
595 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 596 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
596 while (!queue->empty()) { 597 while (!queue->empty()) {
597 IPC::Message* message = queue->front(); 598 IPC::Message* message = queue->front();
598 ReleaseResourcesInDataMessage(*message); 599 ReleaseResourcesInDataMessage(*message);
599 queue->pop_front(); 600 queue->pop_front();
600 delete message; 601 delete message;
601 } 602 }
602 } 603 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698