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

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

Issue 547213002: [ServiceWorker] Move skip_service_worker flag from RequestExtraData to RequestInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/child/request_info.cc ('k') | content/child/web_url_loader_impl.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/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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 request_.referrer_policy = request_info.referrer_policy; 119 request_.referrer_policy = request_info.referrer_policy;
120 request_.headers = request_info.headers; 120 request_.headers = request_info.headers;
121 request_.load_flags = request_info.load_flags; 121 request_.load_flags = request_info.load_flags;
122 request_.origin_pid = request_info.requestor_pid; 122 request_.origin_pid = request_info.requestor_pid;
123 request_.resource_type = request_info.request_type; 123 request_.resource_type = request_info.request_type;
124 request_.priority = request_info.priority; 124 request_.priority = request_info.priority;
125 request_.request_context = request_info.request_context; 125 request_.request_context = request_info.request_context;
126 request_.appcache_host_id = request_info.appcache_host_id; 126 request_.appcache_host_id = request_info.appcache_host_id;
127 request_.download_to_file = request_info.download_to_file; 127 request_.download_to_file = request_info.download_to_file;
128 request_.has_user_gesture = request_info.has_user_gesture; 128 request_.has_user_gesture = request_info.has_user_gesture;
129 request_.skip_service_worker = request_info.skip_service_worker;
129 request_.enable_load_timing = request_info.enable_load_timing; 130 request_.enable_load_timing = request_info.enable_load_timing;
130 131
131 const RequestExtraData kEmptyData; 132 const RequestExtraData kEmptyData;
132 const RequestExtraData* extra_data; 133 const RequestExtraData* extra_data;
133 if (request_info.extra_data) 134 if (request_info.extra_data)
134 extra_data = static_cast<RequestExtraData*>(request_info.extra_data); 135 extra_data = static_cast<RequestExtraData*>(request_info.extra_data);
135 else 136 else
136 extra_data = &kEmptyData; 137 extra_data = &kEmptyData;
137 request_.visiblity_state = extra_data->visibility_state(); 138 request_.visiblity_state = extra_data->visibility_state();
138 request_.render_frame_id = extra_data->render_frame_id(); 139 request_.render_frame_id = extra_data->render_frame_id();
139 request_.is_main_frame = extra_data->is_main_frame(); 140 request_.is_main_frame = extra_data->is_main_frame();
140 request_.parent_is_main_frame = extra_data->parent_is_main_frame(); 141 request_.parent_is_main_frame = extra_data->parent_is_main_frame();
141 request_.parent_render_frame_id = extra_data->parent_render_frame_id(); 142 request_.parent_render_frame_id = extra_data->parent_render_frame_id();
142 request_.allow_download = extra_data->allow_download(); 143 request_.allow_download = extra_data->allow_download();
143 request_.transition_type = extra_data->transition_type(); 144 request_.transition_type = extra_data->transition_type();
144 request_.should_replace_current_entry = 145 request_.should_replace_current_entry =
145 extra_data->should_replace_current_entry(); 146 extra_data->should_replace_current_entry();
146 request_.transferred_request_child_id = 147 request_.transferred_request_child_id =
147 extra_data->transferred_request_child_id(); 148 extra_data->transferred_request_child_id();
148 request_.transferred_request_request_id = 149 request_.transferred_request_request_id =
149 extra_data->transferred_request_request_id(); 150 extra_data->transferred_request_request_id();
150 request_.service_worker_provider_id = 151 request_.service_worker_provider_id =
151 extra_data->service_worker_provider_id(); 152 extra_data->service_worker_provider_id();
152 request_.skip_service_worker = extra_data->skip_service_worker();
153 frame_origin_ = extra_data->frame_origin(); 153 frame_origin_ = extra_data->frame_origin();
154 } 154 }
155 155
156 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { 156 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
157 // we remove our hook for the resource dispatcher only when going away, since 157 // we remove our hook for the resource dispatcher only when going away, since
158 // it doesn't keep track of whether we've force terminated the request 158 // it doesn't keep track of whether we've force terminated the request
159 if (request_id_ >= 0) { 159 if (request_id_ >= 0) {
160 // this operation may fail, as the dispatcher will have preemptively 160 // this operation may fail, as the dispatcher will have preemptively
161 // removed us when the renderer sends the ReceivedAllData message. 161 // removed us when the renderer sends the ReceivedAllData message.
162 dispatcher_->RemovePendingRequest(request_id_); 162 dispatcher_->RemovePendingRequest(request_id_);
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 875 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
876 while (!queue->empty()) { 876 while (!queue->empty()) {
877 IPC::Message* message = queue->front(); 877 IPC::Message* message = queue->front();
878 ReleaseResourcesInDataMessage(*message); 878 ReleaseResourcesInDataMessage(*message);
879 queue->pop_front(); 879 queue->pop_front();
880 delete message; 880 delete message;
881 } 881 }
882 } 882 }
883 883
884 } // namespace content 884 } // namespace content
OLDNEW
« no previous file with comments | « content/child/request_info.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698