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

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

Issue 659093002: Pass the size to the RenderView on creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_enum
Patch Set: Created 6 years, 1 month 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) 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 request_.transition_type = extra_data->transition_type(); 149 request_.transition_type = extra_data->transition_type();
150 request_.should_replace_current_entry = 150 request_.should_replace_current_entry =
151 extra_data->should_replace_current_entry(); 151 extra_data->should_replace_current_entry();
152 request_.transferred_request_child_id = 152 request_.transferred_request_child_id =
153 extra_data->transferred_request_child_id(); 153 extra_data->transferred_request_child_id();
154 request_.transferred_request_request_id = 154 request_.transferred_request_request_id =
155 extra_data->transferred_request_request_id(); 155 extra_data->transferred_request_request_id();
156 request_.service_worker_provider_id = 156 request_.service_worker_provider_id =
157 extra_data->service_worker_provider_id(); 157 extra_data->service_worker_provider_id();
158 frame_origin_ = extra_data->frame_origin(); 158 frame_origin_ = extra_data->frame_origin();
159
160 if (request_.render_frame_id < 1) {
161 // OPTIONS is used for preflighted requests which are generated internally.
162 DCHECK_EQ("OPTIONS", request_.method);
163 }
piman 2014/10/29 18:42:57 Seems unrelated?
mkosiba (inactive) 2014/10/31 14:35:06 part of a different CL. removed.
159 } 164 }
160 165
161 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { 166 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
162 // we remove our hook for the resource dispatcher only when going away, since 167 // we remove our hook for the resource dispatcher only when going away, since
163 // it doesn't keep track of whether we've force terminated the request 168 // it doesn't keep track of whether we've force terminated the request
164 if (request_id_ >= 0) { 169 if (request_id_ >= 0) {
165 // this operation may fail, as the dispatcher will have preemptively 170 // this operation may fail, as the dispatcher will have preemptively
166 // removed us when the renderer sends the ReceivedAllData message. 171 // removed us when the renderer sends the ReceivedAllData message.
167 dispatcher_->RemovePendingRequest(request_id_); 172 dispatcher_->RemovePendingRequest(request_id_);
168 } 173 }
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 891 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
887 while (!queue->empty()) { 892 while (!queue->empty()) {
888 IPC::Message* message = queue->front(); 893 IPC::Message* message = queue->front();
889 ReleaseResourcesInDataMessage(*message); 894 ReleaseResourcesInDataMessage(*message);
890 queue->pop_front(); 895 queue->pop_front();
891 delete message; 896 delete message;
892 } 897 }
893 } 898 }
894 899
895 } // namespace content 900 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698