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

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

Issue 9808029: Prepending view-source: does not load the source of the userscript. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: allow_download_(true) Created 8 years, 7 months 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
« no previous file with comments | « content/common/request_extra_data.cc ('k') | content/common/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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/bind.h" 10 #include "base/bind.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 request_.appcache_host_id = request_info.appcache_host_id; 106 request_.appcache_host_id = request_info.appcache_host_id;
107 request_.download_to_file = request_info.download_to_file; 107 request_.download_to_file = request_info.download_to_file;
108 request_.has_user_gesture = request_info.has_user_gesture; 108 request_.has_user_gesture = request_info.has_user_gesture;
109 if (request_info.extra_data) { 109 if (request_info.extra_data) {
110 RequestExtraData* extra_data = 110 RequestExtraData* extra_data =
111 static_cast<RequestExtraData*>(request_info.extra_data); 111 static_cast<RequestExtraData*>(request_info.extra_data);
112 request_.is_main_frame = extra_data->is_main_frame(); 112 request_.is_main_frame = extra_data->is_main_frame();
113 request_.frame_id = extra_data->frame_id(); 113 request_.frame_id = extra_data->frame_id();
114 request_.parent_is_main_frame = extra_data->parent_is_main_frame(); 114 request_.parent_is_main_frame = extra_data->parent_is_main_frame();
115 request_.parent_frame_id = extra_data->parent_frame_id(); 115 request_.parent_frame_id = extra_data->parent_frame_id();
116 request_.allow_download = extra_data->allow_download();
116 request_.transition_type = extra_data->transition_type(); 117 request_.transition_type = extra_data->transition_type();
117 request_.transferred_request_child_id = 118 request_.transferred_request_child_id =
118 extra_data->transferred_request_child_id(); 119 extra_data->transferred_request_child_id();
119 request_.transferred_request_request_id = 120 request_.transferred_request_request_id =
120 extra_data->transferred_request_request_id(); 121 extra_data->transferred_request_request_id();
121 } else { 122 } else {
122 request_.is_main_frame = false; 123 request_.is_main_frame = false;
123 request_.frame_id = -1; 124 request_.frame_id = -1;
124 request_.parent_is_main_frame = false; 125 request_.parent_is_main_frame = false;
125 request_.parent_frame_id = -1; 126 request_.parent_frame_id = -1;
127 request_.allow_download = true;
126 request_.transition_type = content::PAGE_TRANSITION_LINK; 128 request_.transition_type = content::PAGE_TRANSITION_LINK;
127 request_.transferred_request_child_id = -1; 129 request_.transferred_request_child_id = -1;
128 request_.transferred_request_request_id = -1; 130 request_.transferred_request_request_id = -1;
129 } 131 }
130 } 132 }
131 133
132 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { 134 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
133 // we remove our hook for the resource dispatcher only when going away, since 135 // we remove our hook for the resource dispatcher only when going away, since
134 // it doesn't keep track of whether we've force terminated the request 136 // it doesn't keep track of whether we've force terminated the request
135 if (request_id_ >= 0) { 137 if (request_id_ >= 0) {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 700
699 // static 701 // static
700 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 702 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
701 while (!queue->empty()) { 703 while (!queue->empty()) {
702 IPC::Message* message = queue->front(); 704 IPC::Message* message = queue->front();
703 ReleaseResourcesInDataMessage(*message); 705 ReleaseResourcesInDataMessage(*message);
704 queue->pop_front(); 706 queue->pop_front();
705 delete message; 707 delete message;
706 } 708 }
707 } 709 }
OLDNEW
« no previous file with comments | « content/common/request_extra_data.cc ('k') | content/common/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698